Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    205

    Unanswered: database_name.table_name in create table ?

    Hi,

    In create table statements we use database_name.table_name.

    Eg :

    create table my_database.test_table(sno int .....)

    What is the meaning of this ? Is that, the table is created in the specified database_name ?

    Please clarify.

    Thanks,
    Sam

  2. #2
    Join Date
    Jun 2004
    Location
    Treviso (Italy)
    Posts
    17
    Of course ... But the correct form include owner information as below ...

    CREATE TABLE DBName.OwnerName.TableName (ID int)

    Bye.

  3. #3
    Join Date
    Mar 2004
    Posts
    205

    Hi Ulixse

    Can't I give

    create table db_name.table_name

    ( omitting the owner name ) ?

  4. #4
    Join Date
    Apr 2004
    Location
    Kansas City, MO
    Posts
    734
    No. You can use CREATE TABLE db_name..table_name.

    The owner will default to whoever is running the CREATE TABLE statement. If the are db_owner, it will default to dbo.
    MeanOldDBA
    derrickleggett@hotmail.com
    When life gives you a lemon, fire the DBA.

Posting Permissions

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