You can get table schema or columns of table from query using system object.
Try this
select * from information_schema.tables
select * from information_schema.columns where column_name = ‘StudentID’
select substring(o.name,1,50) as “Table Name”,
c.colid,
substring(c.name,1,30) as “Column Name”,
substring(t.name,1,30) as “DataType”,
c.length
from sysobjects o
left join syscolumns c on (o.id=c.id)
left join systypes t on (c.xusertype=t.xusertype)
where substring(o.name,1,250) like ‘%tblStudentMaster%’
order by 1 ASC
See order by here, [...]
-
« Home
Pages
-
Categories
-
Archives