dbfiddle – Constraints

Background

A couple of posts ago spoke about db<>Fiddle. In this post we will start highlighting features that are not available due to security and feature set constraints in a shared environment.

Legend

  1. db<>fiddle

Code

    1. Schema
      • Create
        • SQL Fails
          • SQL
            •  create schema [lab] authorization [dbo] 
          • Error
            •  Msg 15151 Level 16 State 1 Line 1 Cannot find the user 'dbo', because it does not exist or you do not have permission. Msg 2759 Level 16 State 0 Line 1 CREATE SCHEMA failed due to previous errors. 
        • SQL Works
          • SQL
            •  create schema [lab] 
    2. Memory Optimized
      • Table
        • Create
            • SQL Fails
              •  CREATE TABLE [lab].[well] ( [userID] [varchar](100) COLLATE Latin1_General_100_BIN2 NOT NULL ) WITH ( MEMORY_OPTIMIZED = ON , DURABILITY = SCHEMA_AND_DATA ) 
            • Error
               Msg 41337 Level 16 State 100 Line 39 Cannot create memory optimized tables. To create memory optimized tables, the database must have a MEMORY_OPTIMIZED_FILEGROUP that is online and has at least one container. 
    3. Delimiter/GO
      • SQL fails
        • Code
          •  select [num] =1 go select [number2] =2 
        •  Error
          •  Msg 102 Level 15 State 1 Line 3 Incorrect syntax near 'go'. 
      • SQL Succeeds
        • Code
          •  select [num] =1 ; select [number2] =2 

Summary

Sharing code is not easy. But!

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s