diffeence between .&..

  • hi,

    can anybody tell me difference between below two

    1) Select * from table.col and

    2)Select * from table..col.

    Thanks

    Abhas

  • They are both incorrect syntax. You will get an error if you try to use either of them.

    On the other hand, if you're talking about SELECT * FROM TABLE and SELECT * FROM DATABASE..TABLE, that's a whole nother ball of wax.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Brandie Tarvin (9/11/2012)


    They are both incorrect syntax. You will get an error if you try to use either of them.

    .

    Until

    in case #1: Select * from table.col

    "table" is a schema name and "col" is the name of a table in this schema

    in case #2: Select * from table..col

    "table" is a name of database and "col" is the name of a table in the default schema (dbo)

    It is very stupid but possible!

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • Eugene Elutin (9/11/2012)


    Brandie Tarvin (9/11/2012)


    They are both incorrect syntax. You will get an error if you try to use either of them.

    .

    Until

    in case #1: Select * from table.col

    "table" is a schema name and "col" is the name of a table in this schema

    in case #2: Select * from table..col

    "table" is a name of database and "col" is the name of a table in the default schema (dbo)

    I stand corrected. I was busy thinking "col" was a column name, not a table name.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply