Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
mohan123
Constraint Violating Yak Guru
252 Posts |
Posted - 2013-01-23 : 04:59:53
|
Hello all,How i can get the list of master tables in databse. here i need only master tables not transaction tables or child tables...suggest meP.V.P.MOhan |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-01-23 : 05:32:56
|
Didn't quite get what you meant by master tables, transaction tables, child tables etc.All of these will give you information about base user tables:INFORMATION_SCHEMA.TABLESsys.tablessys.objects where [type] = 'U' |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-23 : 07:13:43
|
quote: Originally posted by mohan123 Hello all,How i can get the list of master tables in databse. here i need only master tables not transaction tables or child tables...suggest meP.V.P.MOhan
probably you meant system tablesSELECT *FROM sys.objectsWHERE type='u'AND is_ms_shipped=1 ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-01-23 : 08:08:25
|
Run this procedure to get all parent table names( take only the tablenames which has oSequence as 1)EXEC sp_msdependencies @intrans = 1--Chandu |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-01-23 : 11:00:23
|
quote: Originally posted by bandi Run this procedure to get all parent table names( take only the tablenames which has oSequence as 1)EXEC sp_msdependencies @intrans = 1--Chandu
Using undocumented features can have undesirable effects as its implementation may change without notice. Its not safe to use this on production environment.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|