SQL语句的随机值与行号,字符串拼接

update share  set wx_cont_url='http://weilian.creatrue.net/aspx/NewsInfo.aspx?id='+cast(share.id as varchar(50)) where  wx_cont_url is null
select top 1 ROW_NUMBER() OVER (ORDER BY id desc) as rownumber, *  from [dbo].[advertisement] where vipid=2  order By NewID()--随机获得一条广告
原文地址:https://www.cnblogs.com/sulong/p/4872434.html