Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2006
    Posts
    111

    Unanswered: dbo.table prefix

    what does dbo prefix to a table mean? how do i create a table without this prefix? thanks! this is probably very basic but i am not really a db developer.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    dbo is the schema (or owner in 2000-). Schemas contain objects, including tables. As such, you can't have a table without a containing schema just as you can't have a table without a containing database.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Jul 2006
    Posts
    111
    thanks. but why is it then some of the tables in my database have no prepending dbo schema? how do i make the table i have just created 'fit in' by having no prefix at all? cheers!

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    This is not a prefix. Think of schemas as containers. dbo.ThisTable indicates <container>.<object>. You can also have other, totally different objects called ThisTable in other schemas
    sys.ThisTable
    pootle.ThisTable

    The prefix is not part of the name, it is a qualifier to indicate the containing schema.

    dbo is a special schema - it is is present in every database and, typically, it is the default schema for users. It stands for "database owner". If you do not explicitly specify a schema when you refer to an object, SQL Server will go to the default schema. This is perhaps why you sometimes see this schema and sometimes not. NOTE that it is typically considered bad practice not to explicitly state the schema when referring to an object, so whereas you are keen to not qualify all objects with the schema name, if I got hold of your code I would add the schema name in.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Jul 2006
    Posts
    111
    i see, i see. thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •