网站开发好了 怎么发布,kratos主题wordpress,淘宝客怎么做网站推广,永康网站设计标题#xff1a;SQL server 数据库使用整理
1.字符串表名多次查询
2.读取SQL中Json字段中的值#xff1a;JSON_VALUE#xff08;最新版本支持#xff0c;属性名大小写敏感#xff09; 1.字符串表名多次查询
SELECT ROW_NUMBER() OVER (ORDER BY value ASC) rowid,value…标题SQL server 数据库使用整理
1.字符串表名多次查询
2.读取SQL中Json字段中的值JSON_VALUE最新版本支持属性名大小写敏感 1.字符串表名多次查询
SELECT ROW_NUMBER() OVER (ORDER BY value ASC) rowid,value tname into #t1 FROM STRING_SPLIT(CCN_VendTransStaging,CCN_SpecTransStaging, ,)
Declare row int, --行记录数
count int--总记录数
Declare tname varchar(100)--table name
select countCOUNT(1),row 1 from #t1
while row count --循环开始
BEGIN
select tnametname from #t1 where rowidrow --当前列的数据
declare s nvarchar(1000) set s select tname as tname,COUNT(*) counts from tname
print(s)
exec(s) -- 成功
set rowrow 1
END
drop table #t1
2.读取SQL中Json字段中的值JSON_VALUE最新版本支持属性名大小写敏感
--{Type:Info,Data:{Info:{Name:hljTest128}}}
SELECT top 11 JSON_VALUE(message,$.Data.Info.Name)as no FROM tableMessage