Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Super Quick Table Meta Data


Super Quick Table Meta Data

Author
Message
Jacques-897195
Jacques-897195
Grasshopper
Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)Grasshopper (21 reputation)

Group: General Forum Members
Points: 21 Visits: 74
Comments posted to this topic are about the item Super Quick Table Meta Data
Tao Klerks
Tao Klerks
Ten Centuries
Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)Ten Centuries (1.4K reputation)

Group: General Forum Members
Points: 1393 Visits: 1249
Interesting article, it would probably benefit from at least a passing mention of the built-in stored procedure sp_help, mentioning how the custom procedure is better or more appropriate for a given situation.

http://poorsql.com for T-SQL formatting: free as in speech, free as in beer, free to run in SSMS or on your version control server - free however you want it.
Tommy Balle
Tommy Balle
Grasshopper
Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)Grasshopper (12 reputation)

Group: General Forum Members
Points: 12 Visits: 54
Hello
I could use this metadata schema, but I could not get it to work in 2005 version.

I got some errors when running the script:
Msg 139, Level 15, State 1, Procedure TableInfo, Line 0
Cannot assign a default value to a local variable.
Msg 139, Level 15, State 1, Procedure TableInfo, Line 0
Cannot assign a default value to a local variable.
Msg 137, Level 15, State 2, Procedure TableInfo, Line 17
Must declare the scalar variable "@DBName".
Msg 137, Level 15, State 2, Procedure TableInfo, Line 20
Must declare the scalar variable "@DBName".
Msg 139, Level 15, State 1, Procedure TableInfo, Line 0
Cannot assign a default value to a local variable.
Msg 139, Level 15, State 1, Procedure TableInfo, Line 0
Cannot assign a default value to a local variable.
Msg 137, Level 15, State 2, Procedure TableInfo, Line 65
Must declare the scalar variable "@TableSchema".
Msg 102, Level 15, State 1, Procedure TableInfo, Line 86
Incorrect syntax near ','.
Msg 137, Level 15, State 2, Procedure TableInfo, Line 116
Must declare the scalar variable "@TableSchema".
Msg 137, Level 15, State 2, Procedure TableInfo, Line 135
Must declare the scalar variable "@Empty".
Msg 137, Level 15, State 2, Procedure TableInfo, Line 316
Must declare the scalar variable "@TableSchema".
Msg 137, Level 15, State 2, Procedure TableInfo, Line 335
Must declare the scalar variable "@Y".

tballe
sandeep187
sandeep187
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 123
Nice piece of work but, you could also type out the table name, highlight it and press Alt + F1 in SSMS, this will return all schema information for the table including keys, indexes and constraints.
vivekanand-246309
vivekanand-246309
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 154
I generally highlight on the Table and Press Alt + F1 (shortcut for sp_help) which gives me all the table details..
Tony Webster
Tony Webster
SSC-Enthusiastic
SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)SSC-Enthusiastic (120 reputation)

Group: General Forum Members
Points: 120 Visits: 321
I've got something similar I wrote that I use. Possibly worth pointing out that you can bind your own stored procedures to keys using "Customise" in SSMS and QA (e.g. Options -> Environment -> Keyboard in SSIS). I guess like the author, I want something that shows the information that I think is more useful to me than alt-F1 / sp_help gives me. For example, my equivalent of alt-F1 gives the corresponding "CREATE TABLE" and "SELECT" statements for the table, which I can then just copy, paste and edit, and shows the metadata descriptions of the fields.

I think the general point though is that you don't have to live with the metadata tools and procedures they give you - there is ample scope to extend them a bit to suit yourself better.
Pieter-423357
Pieter-423357
SSC Journeyman
SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)SSC Journeyman (99 reputation)

Group: General Forum Members
Points: 99 Visits: 564
it be nice if the code actually works. I get the same errors.
Carla Hepker
Carla Hepker
SSC-Enthusiastic
SSC-Enthusiastic (168 reputation)SSC-Enthusiastic (168 reputation)SSC-Enthusiastic (168 reputation)SSC-Enthusiastic (168 reputation)SSC-Enthusiastic (168 reputation)SSC-Enthusiastic (168 reputation)SSC-Enthusiastic (168 reputation)SSC-Enthusiastic (168 reputation)

Group: General Forum Members
Points: 168 Visits: 142
It may be that SQL 2008 allows values to be assigned to local variables in the declaration, but SQL 2005 does not.


Regards,

Carla Hepker
Documentation: A Shaft of light into a coded world.

mtraphagen
mtraphagen
Grasshopper
Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)Grasshopper (23 reputation)

Group: General Forum Members
Points: 23 Visits: 70
Keyboard customization is Very cool!
GSquared
GSquared
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14385 Visits: 9729
I like the proc. I made a modified version that works in SQL 2005 (since that's what I'm using right now). If anyone else wants to check that out, I've attached it to this post.

- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Attachments
TableInfo2005.txt (124 views, 9.00 KB)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search