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
 How can I get the entire description of the Table?

Author  Topic 

grandhi
Starting Member

31 Posts

Posted - 2013-04-17 : 03:16:17
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
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-04-17 : 03:21:58
-- 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 - 2013-04-17 : 03:35:59
Thank you bandi.

Can you tell me,where will get basic tutorials for Insert,Update,Delete queries.
Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-04-17 : 03:41:36
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 - 2013-04-17 : 03:56:34
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/].
Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-04-17 : 07:13:43
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
   

- Advertisement -