存储过程中怎样给变量赋包含查询条件的查询出的值的问题
											declare @StartID int
declare @strWhere nvarchar(1000)
set @strWhere='id=2'
select @StartID=ID from gwlz_gw_table g where id=2
select @StartID 
select @strWhere 
我想把代码中的 id=2 换成 @strWhere 该怎么弄啊 
我的最终目的是把查询出的编号赋给 @StartID 这个变量 

 
											





 
	    

