declare @testtime nvarchar(50)
select @testtime = PTime from Product where pid in (select max(pid) from Product )
set @testtime='Image'+@testtime
select @testtime
筛选出某字段中不重复的内容:
select 字段 from 表名 group by 字段
declare @testtime nvarchar(50)
select @testtime = PTime from Product where pid in (select max(pid) from Product )
set @testtime='Image'+@testtime
筛选出某字段中不重复的内容:
select 字段 from 表名 group by 字段
本文标题:定义变量和很基本的语句
本文链接:https://www.haomeiwen.com/subject/cdkiwxtx.html
网友评论