Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 3rd, 2005, 07:21 AM
hksahu hksahu is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Orissa, India
Posts: 7 hksahu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 45 m 22 sec
Reputation Power: 0
Table Structure in SQL Server 2000

Dear All,
I have loaded SQL Server 2000 and connecting as Backend through VB, i have created some tables after creating a database as per the requirement. Whenever i want to know the table structure i am logging in to the SQL Server through the Enterprise Manager and after clicking on the Particular table and can be able to know the structure by the Design Table Option.

Is there any command available so that i can be able to know the structure using the SQL Query Analyser. As i am using frequently the SQL Query Analyser.


Thanks & Kind Regards,
Harekrushna

Reply With Quote
  #2  
Old May 3rd, 2005, 08:48 AM
trubolotta trubolotta is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: May 2005
Location: Wheeling, IL
Posts: 171 trubolotta User rank is Private First Class (20 - 50 Reputation Level)trubolotta User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 5 Days 11 h 45 m 27 sec
Reputation Power: 4
Thumbs up

There are a number of built-in stored procedures that will return structure information and metadata, but I find that to be rather tedious. I usually open 2 or 3 instances of Enterprise Manager and 1 instance of Query Analyzer and navigate between them as needed. If I'm using VB (depending on version) most of the structure data is available in the view database window once you add a connection object. In Visual InterDev, same applies if you add a data command to the global asa.

The built-in SPs are OK, but I just don't want to waste gray cells comitting them to memory.

Hope this helps.

Reply With Quote
  #3  
Old May 3rd, 2005, 09:06 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,776 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 27 m 42 sec
Reputation Power: 470
you can try
Code:
sp_help 'TableName'

or
Code:
SELECT *
FROM Information_Schema.Columns
WHERE Table_Name = 'TableName'

Reply With Quote
  #4  
Old May 4th, 2005, 12:51 AM
hksahu hksahu is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Orissa, India
Posts: 7 hksahu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 45 m 22 sec
Reputation Power: 0
Thanks

Thanks a Lot.

Harekrushna

Quote:
Originally Posted by Memnoch
you can try
Code:
 sp_help 'TableName'
 

or
Code:
 SELECT *
 FROM Information_Schema.Columns
 WHERE Table_Name = 'TableName'
 

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Table Structure in SQL Server 2000


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT