Database Problem

  • We have a database named Foreign i cant query in this database because the word 'Foreign' is used in SQL Server and not recognized as a database name is there any possbile solution to this?

    Example:

    --When i run this script

    Foreign..sp_tables

    /*

    I recieved this error

    Server: Msg 156, Level 15, State 1, Line 1

    Incorrect syntax near the keyword 'Foreign'.

    */

    "-=Still Learning=-"

    Lester Policarpio

  • Just enclose the word Foreign within box braces... [Foreign]

  • Thank you very much so dumb to ever think of it hehehehe

    "-=Still Learning=-"

    Lester Policarpio

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

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