存储过程中我要引用一个带引好的变量不知道如何写
例:
declare @date as nvarchar(10)
date里我放入2006-07-01
引用出来的值要是'2006-07-01'
在存储过程中如果用''过程就当字符引用了
请问如何引用类似变量
例:
declare @date as nvarchar(10)
date里我放入2006-07-01
引用出来的值要是'2006-07-01'
在存储过程中如果用''过程就当字符引用了
请问如何引用类似变量
set @date='2006-07-01'
declare @date as nvarchar(10)
set @date = '2006-07-01'
select * from table1 where [date] like @date
set @time=getdate()
print convert(varchar(100),@time,120)
@date datetime
as
print ''''+convert(varchar(10),@date,120)+''''gotest '2006-07-01'这样?