SQL – set default schema for each D/B

Home Forums Tech Database SQL – set default schema for each D/B

Tagged: , , , ,

This topic contains 0 replies, has 1 voice, and was last updated by  Mr. Mangus 2 years, 8 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #5168

    Mr. Mangus

    In SQL Server Manager Studio (SSMS) you can set a default schema on per D/B, per user basis.
    If you want to shorten your SQL statements, you can remove explicit D/B name by using USE command

    USE Your_DB_Name

    Furthermore, you can remove explicit SCHEMA name by setting default SCHEMA for each database (Security – Logins – Your User Name – User Mapping).

    Now you can refer to tables with a simple table name, like Your_Table_Name instead of a long notation Your_DB_Name.SCHEMA.Your_Table_Name.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.