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.
| Author |
Topic |
|
Progress2007
Starting Member
17 Posts |
Posted - 2009-03-17 : 09:35:35
|
| HelloI want to get all the information for a table like Column name, Column type etc, I have used Information_Schema_Columns in SQL 2005 but can not able to use it.Can u great people tell me how can i do this |
|
|
pootle_flump
1064 Posts |
Posted - 2009-03-17 : 09:37:51
|
| [code]SELECT *FROM sys.columnsWHERE object_id = OBJECT_ID('dbo.myTableName')[/code] |
 |
|
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2009-03-17 : 09:38:34
|
| With a little work getting the id's turned into names you could use sys.columns. What do you mean you can't use information_schema? It's not there or you don't have permissions to it? I ask because you may find the same problem with sys.columns. You could also try sp_help if you're just browsing tables.Mike"oh, that monkey is going to pay" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-03-17 : 11:12:13
|
quote: Originally posted by Progress2007 HelloI want to get all the information for a table like Column name, Column type etc, I have used Information_Schema_Columns in SQL 2005 but can not able to use it.Can u great people tell me how can i do this
its Information_Schema.Columns. try thisselect * from information_schema.columns where table-name ='your table name' |
 |
|
|
|
|
|