hi,
i want to get column names of table in sys.table using its object_id
regards vivek
hi,
i want to get column names of table in sys.table using its object_id
regards vivek
SELECT name
FROM sys.columns
WHERE [object_id] = OBJECT_ID(N'[dbo].[<your table name here>]')
If you know the object id, you can stick it in instead of OBJECT_ID(N'[dbo].[<your table name here>]')
. Or, you could also stick a variable there.