简体   繁体   中英

Grouping tables in SQL SERVER

How do I group a set of tables or label them together?

In our project, each user has two separate tables allocated for them. I need to group all users tables separately.

How do I accomplish this?

Perhaps you could use SQL Server Schemas to create logical separation of database objects (tables,views,stored procedures,functions,triggers etc.).

See the Microsoft Books Online Reference: User-Schema Separation

Using this method, you could then group related tables into the same schema.

You may have to create another table to track what tables are allocated to whom. You can save Object Id of the tables with the User's ID.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM