SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How can I get the entire description of the Table?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

grandhi
Starting Member

31 Posts

Posted - 04/17/2013 :  03:16:17  Show Profile  Reply with Quote
HI Guys,

I am new to database side,but I need to work on Database (Ms Sql server 2012).For this

I installed Ms Sql server 2012,using Google help I created new database and also in that I created a new Table with more than 20 columns and the table name is FirstTable.

I forgotten,which data Types are mention of columns.So

I want to know the entire information about the table(FirstTable).

I tried in the following way,but it's not working

DESC FirstTable

can anyone help me ?

Fell free,If you want to edit my question.

Thanks.

bandi
Flowing Fount of Yak Knowledge

India
2217 Posts

Posted - 04/17/2013 :  03:21:58  Show Profile  Reply with Quote
-- To get list of columns and datatypes
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'FirstTable'

--
Chandu
Go to Top of Page

grandhi
Starting Member

31 Posts

Posted - 04/17/2013 :  03:35:59  Show Profile  Reply with Quote
Thank you bandi.

Can you tell me,where will get basic tutorials for Insert,Update,Delete queries.

Edited by - grandhi on 04/17/2013 03:37:15
Go to Top of Page

bandi
Flowing Fount of Yak Knowledge

India
2217 Posts

Posted - 04/17/2013 :  03:41:36  Show Profile  Reply with Quote
For basics, refer http://www.w3schools.com/sql/
http://www.codeproject.com/Articles/16363/Generate-SQL-Select-Insert-Update-and-Delete
sqlauthority.com --> Search Tab --> type your keywords

Follow sqlteam.com forum you will get good knowledge...

--
Chandu
Go to Top of Page

grandhi
Starting Member

31 Posts

Posted - 04/17/2013 :  03:56:34  Show Profile  Reply with Quote
bandi,

earlier you mention INFORMATION_SCHEMA.COLUMNS in your code,in that INFORMATION_SCHEMA is it package name? like that what is [b]COLUMN[/b/].

Edited by - grandhi on 04/17/2013 03:57:46
Go to Top of Page

bandi
Flowing Fount of Yak Knowledge

India
2217 Posts

Posted - 04/17/2013 :  07:13:43  Show Profile  Reply with Quote
INFORMATION_SCHEMA is an information schema view...
Refer the link http://msdn.microsoft.com/en-us/library/ms186778.aspx

--
Chandu
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000