I am new to MS SQL Server, coming from MySQL. I sort of understand MS SQL schemas and their purpose, but I don't see any need for them for small applications with the one DBA.
Is it possible to ignore schemas altogether, for example to create and query tables? If so what would be the format to create a table without specifying a schema? This is in Azure, with an Azure SQL DB.
UPDATE
Thanks to the answer below you don't apparently need to specify a schema when creating a table. Once created, the table will automatically have the schema 'dbo' applied by default.
CREATE TABLE cm_user
(
cm_user_pk int PRIMARY KEY CLUSTERED,
user_code VARCHAR(10) NOT NULL,
first_name VARCHAR(60) NOT NULL,
last_name VARCHAR(60) NOT NULL,
email VARCHAR(100) NOT NULL,
user_type VARCHAR(20) NOT NULL
)
results in the table dbo.cm_user_pk
VARCHAR(MAX)
column and stuff anything you like into it. However it is 100% a bad idea. If you're talking about schemas as in thedbo
part ofdbo.table
, then yes, you don't need to worry about schemas if you don't want. They only give you advantages, but if you can't see any thats fine - Nick.McDermaid