We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Getting SQL Table Schema

Medium Priority
453 Views
Last Modified: 2012-05-11
SQL :-

On highlighting the name of the Table in the SQL Management Studio - and pressing a short key - Alt + .. we would be able to get the Table Schema ..along with columns ..

I forgot the short code ..! to get the columns for a Table ..!

Comment
Watch Question

CERTIFIED EXPERT

Commented:
I don't know about that shortcut, but you can right-click the table and select:
Script Table as / CREATE To / New Query Editor Window
chokkaStudent

Author

Commented:
I am aware about the Create Script

Like SP_Tables .. do we have any inbuilt functions

or from Information_Schema , is there any way for me to get it on Management Studio ..!
CERTIFIED EXPERT
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
chokkaStudent

Author

Commented:
KinghtEKnight :- Thank you ..! This is what i expected through Short Key ..!

Your comment is right. I have to wait couple of more comments for Short Key ..! I actually forgotten the Short Key ..which i used to do very frequently ..!
CERTIFIED EXPERT

Commented:
I'm looking forward to learning it myself!
Also, if you do  SELECT *  in the previous query you will see more good stuff...
chokkaStudent

Author

Commented:
knightEknight:  


1) Type Table Name on SQL Management Studio

2) Highlight the Table Name

3) Press Alt + F1

You can see entire Table Schema !!!!

CERTIFIED EXPERT

Commented:
Thanks!  But it doesn't seem to work for me ...

In Management Studio (SQL Server 2005/8), in the Object Explorer I expand the database / Tables and click on (highlight) a table name.  ALT-F1 - nothing happens.  Am I doing it right?
chokkaStudent

Author

Commented:
First type

Select * from TableA

Now double click on word :  TableA

This will be highlighted automatically

Once it got highlighted - Alt + F1 will give you entire result.

This runs only on Management Studio and not Object Browser !!!
CERTIFIED EXPERT

Commented:
Got it - it works!  Thanks!
chokkaStudent

Author

Commented:
Glad to hear !!!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.