CREATE TABLE [dbo].[Table] - what does the dbo part mean?

15,868

Solution 1

That is the Schema that the table is being placed in. This is not actually required as dbo is the default schema and any objects referenced without schema specified are assumed to be in dbo.

If you were to create your own schema eg:

CREATE SCHEMA [MySchema] AUTHORIZATION [dbo]

You would then have to reference any objects in it as [MySchema].[MyObject]

More on S.O.

Solution 2

"dbo" is a special schema, it is the database-owner. It exists in every database, but you can add schemas (like folders) to databases

From: https://stackoverflow.com/a/4824493/677480

Share:
15,868
Jimmyt1988
Author by

Jimmyt1988

Updated on June 04, 2022

Comments

  • Jimmyt1988
    Jimmyt1988 about 2 years

    When I go to create a new Table, I'm aware that I can do something like:

    CREATE TABLE Users
    (
        [Id] INT NOT NULL PRIMARY KEY
    )
    

    But what does the [dbo]. part mean in the following example:

    CREATE TABLE [dbo].[Table]
    (
        [Id] INT NOT NULL PRIMARY KEY
    )