views:

126

answers:

2

Hello everyone, 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?

Thanks.

A: 

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.

TheVillageIdiot
I already have that. My problem now is that it's all displayed totally mixed up with the other core tables in Management Studio.
Josh
+2  A: 

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.

John Sansom
@Tom H: Dude come on why are modifying my post spelling from British to American English :-)
John Sansom
Hey, I stopped changing "optimise" and "colour", I didn't realize that "seperate" was a British spelling. I thought it was just a common misspelling. :)A quick search turned this up from those blokes over at Oxford: http://www.oxforddictionaries.com/page/spellingcommonmisp/common-misspellings;jsessionid=D38660456AB0B89CFB410B03FC50E8CB
Tom H.
Bah what do they know anyway :-)
John Sansom