____成风破浪会有时,直把云帆济沧海!
CREATE PROCEDURE GetEmpName @EmpId int,@Kind varchar(10) AS Declare @SQL nVarchar(100) Set @SQL='Select '+@Kind+' from mrBaseInf where EmpId ='+Cast( @EmpId as Varchar(100)) Execute sp_executesql @SQL
GO