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 |
chbala85
Starting Member
49 Posts |
Posted - 2013-12-03 : 04:59:30
|
Hi All,I required query like in particular databaseall tablename,columnname,constrainttype,constraintnameplease help me.Thanks,Krish. |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-12-03 : 06:26:29
|
you should be using COLUMNS,CONSTRAINT_COLUMN_USAGE and TABLE_CONSTRAINTS views in INFOMRATION_SCHEMA for this------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
vinay_555
Starting Member
10 Posts |
Posted - 2013-12-03 : 08:16:12
|
Execute Sp_help table_name Ur Issue will be resolved |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-12-03 : 09:25:15
|
quote: Originally posted by vinay_555 Execute Sp_help table_name Ur Issue will be resolved
for viewing its okhowever if the attempt is to use this resultset further then sp_help wont work as its gives this info in multiple resultsets------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-12-04 : 00:31:07
|
quote: Originally posted by visakh16
quote: Originally posted by vinay_555 Execute Sp_help table_name Ur Issue will be resolved
for viewing its okhowever if the attempt is to use this resultset further then sp_help wont work as its gives this info in multiple resultsets------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs
OR for a particular database all tablename, .. . as what OP had specified, using sp_help might not be very practical at all KH[spoiler]Time is always against us[/spoiler] |
|
|
|
|
|
|
|