declare @columnName varchar(30),@tableId int
set @columnName='列名’
select name,@tableId=id from syscolumns where name=@columnName
SELECT * FROM sysobjects WHERE xtype = 'U' and id=@tableId
declare @columnName varchar(30),@tableId int
set @columnName='列名’
select name,@tableId=id from syscolumns where name=@columnName
SELECT * FROM sysobjects WHERE xtype = 'U' and id=@tableId