June 19, 2006 at 4:28 am
Hi All,
Is there any query in TSQL which returns the table struction, as we can do in oracle e.g,
Desc EMP
Regards,
Zaheer
June 19, 2006 at 5:24 am
closest is:
exec
sp_help N'EMP'
or select from a system view/table (depends on SQL version) with N'EMP' or object_id(N'EMP') in the where clause.
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 19, 2006 at 5:41 am
try this
select sysobjects.name as TableName ,syscolumns.name as ColumnName ,systypes.name as TypeData from
sysobjects inner join
syscolumns on sysobjects.id = syscolumns.id inner join
systypes on syscolumns.xtype = systypes.xtype
where sysobjects.name = 'your table'
June 20, 2006 at 2:00 am
Thanks Guys
Regards,
Zaheer
June 20, 2006 at 10:20 am
June 20, 2006 at 11:26 pm
Hi,
Once again thanks all of you Gurus
Regards,
Zaheer
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply