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 |
anwarul.haque
Starting Member
7 Posts |
Posted - 2008-11-24 : 00:39:48
|
How to get these details fieldname, field type, field size, and maximum width of the values in the field from either SQL Proc or query,Thanks in AdvHaque |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-24 : 00:41:54
|
[code]SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME ='Your Table name here'[/code] |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-24 : 00:42:17
|
or just usesp_help tablename |
|
|
anwarul.haque
Starting Member
7 Posts |
Posted - 2008-11-24 : 02:14:43
|
Thanks for quick response!I have this one SELECT obj.name Table_Name, sycol.name Column_Name,Len(sycol.name) 'Data Length', t.name DataType, sycol.Length FROM sysobjects objINNER JOIN syscolumns sycol ON (obj.id=sycol.id and obj.type='U' and obj.name not like 'dt%')Inner Join systypes t ON (sycol.xtype=t.xtype) order by obj.name, sycol.nameto get the out put now.But I need to take one by one field detail and store in Temp tablesis it possible? Thanks againquote: Originally posted by visakh16
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME ='Your Table name here'
Haque |
|
|
anwarul.haque
Starting Member
7 Posts |
Posted - 2008-11-24 : 02:16:08
|
Thanks visakh!quote: Originally posted by visakh16 or just usesp_help tablename
Haque |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-24 : 02:41:01
|
Welcome |
|
|
|
|
|