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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Stupid Question of the Day...

Author  Topic 

Auric
Yak Posting Veteran

70 Posts

Posted - 2005-11-24 : 14:32:03
Afternoon everybody...

Here is my noob question of the day, is there a query I can run to display the STRUCTURE of a table? fieldnames, datatypes, sizes etc?

Select * from users where clue > 0

Auric
Yak Posting Veteran

70 Posts

Posted - 2005-11-24 : 14:39:07
nevermind... GOOGLE IS YOUR FRIEND

sp_help <tablename>

Select * from users where clue > 0
Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2005-11-24 : 22:19:33
what was stupid about that question?!



--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2005-11-24 : 22:22:40
quote:
Originally posted by Auric

nevermind... GOOGLE IS YOUR FRIEND

sp_help <tablename>

Select * from users where clue > 0



smart answer of the day

-----------------
[KH]
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-24 : 23:42:46
Correct question for newbie
Other answer
Select * from information_schema.columns where table_name='yourTable'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -