SQL将Json字符串转为表格

2023-05-16

支持复杂结构的使用..

使用Parent_ID来对应Object_ID产生关系就好.. 

实现对Json数据的从文字到表变量的转换..

例: 


[
    {
        "FieldName": "DateKey",
        "Title": "汇总后日期",
        "Description": "",
        "DataType": 4,
        "DataGroup": 0,
        "SumMethod": 0,
        "DataSumField": "",
        "MaxLenght": 100,
        "IsAllowNull": false,
        "UnionFieldName": "",
        "SortID": -99,
        "IsSourceField": true,
        "IsLabelSearch": true,
        "IsPartition": true,
        "IsSQLBSumField": true
    },
    {
        "FieldName": "MemberNumber",
        "Title": "会员卡编号",
        "Description": "",
        "DataType": 2,
        "DataGroup": 0,
        "SumMethod": 0,
        "DataSumField": "",
        "MaxLenght": 100,
        "IsAllowNull": false,
        "UnionFieldName": "",
        "SortID": 0,
        "IsSourceField": true,
        "IsLabelSearch": false,
        "IsPartition": false,
        "IsSQLBSumField": true
    },
    {
        "FieldName": "PageNo",
        "Title": "频道页编号",
        "Description": "",
        "DataType": 2,
        "DataGroup": 0,
        "SumMethod": 0,
        "DataSumField": "",
        "MaxLenght": 100,
        "IsAllowNull": false,
        "UnionFieldName": "",
        "SortID": 1,
        "IsSourceField": true,
        "IsLabelSearch": true,
        "IsPartition": false,
        "IsSQLBSumField": true
    }
]  

以上Json调用函数后输出一下图片中的内容..


Declare @str nvarchar(max)
set @str='上边的Json字符串'
Select * from parseJSON(@str)
  


  

--下边的函数..执行就好..

SET ANSI_NULLS ON;  
SET QUOTED_IDENTIFIER ON;  
GO  
  
IF NOT EXISTS(  
    select * from sys.objects where   
    object_id = OBJECT_ID(N'dbo.ParseJSON') AND   
    type in (N'FN', N'IF', N'TF', N'FS', N'FT', N'F'))  
BEGIN  
    EXEC('CREATE FUNCTION dbo.ParseJSON() RETURNS @hierarchy table( id int ) AS BEGIN RETURN END;');  
    PRINT 'FUNCTION dbo.ParseJSON is created.';  
END  
  
GO
ALTER FUNCTION [dbo].[ParseJSON]( @json nvarchar(max) ) 
RETURNS @hierarchy table 
( 
object_id int NOT NULL, /* [0 -- Not an object] each list or object has an object id. This ties all elements to a parent. Lists are treated as objects here */ 
parent_id int NOT NULL, /* [0 -- Root] if the element has a parent then it is in this column. The document is the ultimate parent, so you can get the structure from recursing from the document */ 
name nvarchar(2000), /* the name of the object */ 
stringvalue nvarchar(4000) NOT NULL, /*the string representation of the value of the element. */ 
valuetype nvarchar(100) NOT NULL, /* the declared type of the value represented as a string in stringvalue*/ 
bigintvalue bigint, 
boolvalue bit 
) 

AS 

BEGIN 
DECLARE 
@firstobject int, --the index of the first open bracket found in the JSON string 
@opendelimiter int, --the index of the next open bracket found in the JSON string 
@nextopendelimiter int,--the index of subsequent open bracket found in the JSON string 
@nextclosedelimiter int,--the index of subsequent close bracket found in the JSON string 
@type nvarchar(10),--whether it denotes an object or an array 
@nextclosedelimiterChar CHAR(1),--either a '}' or a ']' 
@contents nvarchar(MAX), --the unparsed contents of the bracketed expression 
@start int, --index of the start of the token that you are parsing 
@end int,--index of the end of the token that you are parsing 
@param int,--the parameter at the end of the next Object/Array token 
@endofname int,--the index of the start of the parameter at end of Object/Array token 
@token nvarchar(4000),--either a string or object 
@value nvarchar(MAX), -- the value as a string 
@name nvarchar(200), --the name as a string 
@parent_id int,--the next parent ID to allocate 
@lenjson int,--the current length of the JSON String 
@characters NCHAR(62),--used to convert hex to decimal 
@result BIGINT,--the value of the hex symbol being parsed 
@index SMALLINT,--used for parsing the hex value 
@escape int; --the index of the next escape character 

/* in this temporary table we keep all strings, even the names of the elements, since they are 'escaped' 
* in a different way, and may contain, unescaped, brackets denoting objects or lists. These are replaced in 
* the JSON string by tokens representing the string 
*/ 
DECLARE @strings table 
( 
string_id int IDENTITY(1, 1), 
stringvalue nvarchar(MAX) 
) 

/* initialise the characters to convert hex to ascii */ 
SET @characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 
SET @parent_id = 0; 

/* firstly we process all strings. This is done because [{} and ] aren't escaped in strings, which complicates an iterative parse. */ 
WHILE 1 = 1 /* forever until there is nothing more to do */ 
BEGIN 
SET @start = PATINDEX('%[^a-zA-Z]["]%', @json collate SQL_Latin1_General_CP850_Bin); /* next delimited string */ 

IF @start = 0 BREAK; /*no more so drop through the WHILE loop */ 

IF SUBSTRING(@json, @start+1, 1) = '"' 
BEGIN /* Delimited name */ 
SET @start = @start+1; 
SET @end = PATINDEX('%[^\]["]%', RIGHT(@json, LEN(@json+'|')-@start) collate SQL_Latin1_General_CP850_Bin); 
END 

IF @end = 0 /*no end delimiter to last string*/ 
BREAK; /* no more */ 

SELECT @token = SUBSTRING(@json, @start+1, @end-1) 

/* now put in the escaped control characters */ 
SELECT @token = REPLACE(@token, from_string, to_string) 
FROM 
( 
SELECT '\"' AS from_string, '"' AS to_string 
UNION ALL 
SELECT '\\', '\' 
UNION ALL 
SELECT '\/', '/' 
UNION ALL 
SELECT '\b', CHAR(08) 
UNION ALL 
SELECT '\f', CHAR(12) 
UNION ALL 
SELECT '\n', CHAR(10) 
UNION ALL 
SELECT '\r', CHAR(13) 
UNION ALL 
SELECT '\t', CHAR(09) 
) substitutions; 

SET @result = 0; 
SET @escape = 1; 

/*Begin to take out any hex escape codes*/ 
WHILE @escape > 0 
BEGIN 

/* find the next hex escape sequence */ 
SET @index = 0; 
SET @escape = PATINDEX('%\x[0-9a-f][0-9a-f][0-9a-f][0-9a-f]%', @token collate SQL_Latin1_General_CP850_Bin); 

IF @escape > 0 /* if there is one */ 
BEGIN 

WHILE @index < 4 /* there are always four digits to a \x sequence */ 
BEGIN 
/* determine its value */ 
SET @result = @result + POWER(16, @index) * (CHARINDEX(SUBSTRING(@token, @escape + 2 + 3 - @index, 1), @characters) - 1); 
SET @index = @index + 1; 
END 

/* and replace the hex sequence by its unicode value */ 
SET @token = STUFF(@token, @escape, 6, NCHAR(@result)); 
END 

END 

/* now store the string away */ 
INSERT INTO @strings (stringvalue) SELECT @token; 

/* and replace the string with a token */ 
SET @json = STUFF(@json, @start, @end + 1, '@string' + CONVERT(nvarchar(5), @@identity)); 

END 

/* all strings are now removed. Now we find the first leaf. */ 
WHILE 1 = 1 /* forever until there is nothing more to do */ 
BEGIN 

SET @parent_id = @parent_id + 1; 

/* find the first object or list by looking for the open bracket */ 
SET @firstobject = PATINDEX('%[{[[]%', @json collate SQL_Latin1_General_CP850_Bin); /*object or array*/ 

IF @firstobject = 0 BREAK; 

IF (SUBSTRING(@json, @firstobject, 1) = '{') 
SELECT @nextclosedelimiterChar = '}', @type = 'object'; 
ELSE 
SELECT @nextclosedelimiterChar = ']', @type = 'array'; 


SET @opendelimiter = @firstobject; 

WHILE 1 = 1 --find the innermost object or list... 
BEGIN 
SET @lenjson = LEN(@json+'|') - 1; 

/* find the matching close-delimiter proceeding after the open-delimiter */ 
SET @nextclosedelimiter = CHARINDEX(@nextclosedelimiterChar, @json, @opendelimiter + 1); 

/* is there an intervening open-delimiter of either type */ 
SET @nextopendelimiter = PATINDEX('%[{[[]%',RIGHT(@json, @lenjson-@opendelimiter) collate SQL_Latin1_General_CP850_Bin); /*object*/ 

IF @nextopendelimiter = 0 BREAK; 

SET @nextopendelimiter = @nextopendelimiter + @opendelimiter; 

IF @nextclosedelimiter < @nextopendelimiter BREAK; 

IF SUBSTRING(@json, @nextopendelimiter, 1) = '{' 
SELECT @nextclosedelimiterChar = '}', @type = 'object'; 
ELSE 
SELECT @nextclosedelimiterChar = ']', @type = 'array'; 

SET @opendelimiter = @nextopendelimiter; 
END 

/* and parse out the list or name/value pairs */ 
SET @contents = SUBSTRING(@json, @opendelimiter+1, @nextclosedelimiter-@opendelimiter - 1); 

SET @json = STUFF(@json, @opendelimiter, @nextclosedelimiter - @opendelimiter + 1, '@' + @type + CONVERT(nvarchar(5), @parent_id)); 

WHILE (PATINDEX('%[A-Za-z0-9@+.e]%', @contents collate SQL_Latin1_General_CP850_Bin)) < > 0 
BEGIN /* WHILE PATINDEX */ 

IF @type = 'object' /*it will be a 0-n list containing a string followed by a string, number,boolean, or null*/ 
BEGIN 

SET @end = CHARINDEX(':', ' '+@contents); /*if there is anything, it will be a string-based name.*/ 
SET @start = PATINDEX('%[^A-Za-z@][@]%', ' ' + @contents collate SQL_Latin1_General_CP850_Bin); /*AAAAAAAA*/ 

SET @token = SUBSTRING(' '+@contents, @start + 1, @end - @start - 1); 
SET @endofname = PATINDEX('%[0-9]%', @token collate SQL_Latin1_General_CP850_Bin); 
SET @param = RIGHT(@token, LEN(@token)-@endofname + 1); 

SET @token = LEFT(@token, @endofname - 1); 
SET @contents = RIGHT(' ' + @contents, LEN(' ' + @contents + '|') - @end - 1); 

SELECT @name = stringvalue FROM @strings WHERE string_id = @param; /*fetch the name*/ 

END 
ELSE 
BEGIN 
SET @name = null; 
END 

SET @end = CHARINDEX(',', @contents); /*a string-token, object-token, list-token, number,boolean, or null*/ 

IF @end = 0 
SET @end = PATINDEX('%[A-Za-z0-9@+.e][^A-Za-z0-9@+.e]%', @contents+' ' collate SQL_Latin1_General_CP850_Bin) + 1; 

SET @start = PATINDEX('%[^A-Za-z0-9@+.e][A-Za-z0-9@+.e]%', ' ' + @contents collate SQL_Latin1_General_CP850_Bin); 

/*select @start,@end, LEN(@contents+'|'), @contents */ 

SET @value = RTRIM(SUBSTRING(@contents, @start, @end-@start)); 
SET @contents = RIGHT(@contents + ' ', LEN(@contents+'|') - @end); 

IF SUBSTRING(@value, 1, 7) = '@object' 
INSERT INTO @hierarchy (name, parent_id, stringvalue, object_id, valuetype) 
SELECT @name, @parent_id, SUBSTRING(@value, 8, 5), SUBSTRING(@value, 8, 5), 'object'; 

ELSE 
IF SUBSTRING(@value, 1, 6) = '@array' 
INSERT INTO @hierarchy (name, parent_id, stringvalue, object_id, valuetype) 
SELECT @name, @parent_id, SUBSTRING(@value, 7, 5), SUBSTRING(@value, 7, 5), 'array'; 
ELSE 
IF SUBSTRING(@value, 1, 7) = '@string' 
INSERT INTO @hierarchy (name, parent_id, stringvalue, valuetype, object_id) 
SELECT @name, @parent_id, stringvalue, 'string', 0 
FROM @strings 
WHERE string_id = SUBSTRING(@value, 8, 5); 
ELSE 
IF @value IN ('true', 'false') 
INSERT INTO @hierarchy (name, parent_id, stringvalue, valuetype, object_id, boolvalue) 
SELECT @name, @parent_id, @value, 'boolean', 0, CASE @value WHEN 'true' THEN 1 ELSE 0 END; 
ELSE 
IF @value = 'null' 
INSERT INTO @hierarchy (name, parent_id, stringvalue, valuetype, object_id) 
SELECT @name, @parent_id, @value, 'null', 0; 
ELSE 
IF PATINDEX('%[^0-9]%', @value collate SQL_Latin1_General_CP850_Bin) > 0 
INSERT INTO @hierarchy (name, parent_id, stringvalue, valuetype, object_id) 
SELECT @name, @parent_id, @value, 'real', 0; 
ELSE 
INSERT INTO @hierarchy (name, parent_id, stringvalue, valuetype, object_id, bigintvalue)
SELECT @name, @parent_id, @value, 'bigint', 0, CONVERT(BIGINT,@value);

END /* WHILE PATINDEX */ 

END /* WHILE 1=1 forever until there is nothing more to do */ 

INSERT INTO @hierarchy (name, parent_id, stringvalue, object_id, valuetype) 
SELECT '', 0, '', @parent_id - 1, @type; 

RETURN; 

END

GO  
  
PRINT 'FUNCTION dbo.ParseJSON is modified.';  
GO    
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

SQL将Json字符串转为表格 的相关文章

  • Jetpack Compose 从入门到入门(九)

    本篇是Compose的手势部分 点击 添加clickable修饰符就可以轻松实现元素的点击 此外它还提供无障碍功能 xff0c 并在点按时显示水波纹效果 span class token annotation builtin 64 Comp
  • 记参加 2022 Google开发者大会

    前几天有幸参加了2022年Google 开发者大会 Google Developer Summit xff0c 上一次参加Google开发者大会还是2019年 这期间因为众所周知的原因 xff0c 开发者大会都改为了线上举办 和上次相比可以
  • Jetpack Compose 从入门到入门(十)

    本篇介绍如何将Jetpack Compose 添加到已有应用中 xff0c 毕竟大多数情况都是在现有项目中使用 Jetpack Compose 旨在配合既有的基于 View 的界面构造方式一起使用 如果您要构建新应用 xff0c 最好的选择
  • Flutter状态管理之Riverpod 2.0

    两年前分享过一篇Flutter状态管理之Riverpod xff0c 当时riverpod的版本还是0 8 0 xff08 后来文章更新到0 14版本 xff09 当时提到过有一些不足之处 xff1a 毕竟诞生不久 xff0c 它还不能保证
  • Python:元组和字典简述

    目录 1 列表的方法2 for循环遍历列表2 1 语法2 2 range 函数 3 元组3 1 元组的基本概念3 2 元组的创建3 3 元组的解包3 3 1 号在解包中的用法 4 字典4 1 字典的基本概念4 2 字典的使用4 2 1 字典
  • 七种常见软件开发模型

    目录 瀑布模型 xff08 面向文档的软件开发模型 xff09 演化模型 螺旋模型 增量模型 构件组装模型 统一过程 xff08 up xff09 xff08 迭代的软件过程 xff0c 以架构为中心 xff09 敏捷开发模型 瀑布模型 x
  • IP安全策略:只允许指定IP连接远程桌面,限制IP登录

    一 xff0c 新建IP安全策略 WIN 43 R打开运行对话框 xff0c 输入gpedit msc进入组策略编辑器 依次打开 本地计算机 策略 计算机配置 Windows设置 安全设置 IP安全策略 在 本地计算机上 在右面的空白处右击
  • 2022年终总结

    不知不觉就到了年末 xff0c 感叹时间过的真快 我自己坚持写了七年多的博客 xff0c 但这其实是我第一次去写年终总结 也不知道怎么写 xff0c 就简单聊聊 写博客的初衷就是个人收获 xff0c 学习的记录 xff0c 分享出来如果能帮
  • Rust库交叉编译以及在Android与iOS中使用

    本篇是关于交叉编译Rust库 xff0c 生成Android和iOS的二进制文件 xff08 so与a文件 xff09 xff0c 以及简单的集成使用 1 环境 系统 xff1a macOS 13 0 M1 Pro xff0c Window
  • 利用Rust与Flutter开发一款小工具

    1 起因 起因是年前看到了一篇Rust 43 iOS amp Android xff5c 未入门也能用来造轮子 xff1f 的文章 xff0c 作者使用Rust做了个实时查看埋点的工具 其中作者的一段话给了我启发 xff1a 无论是 Loo
  • 在Android与iOS中使用LLDB调试Rust程序

    在Rust中通过println 打印的日志信息在Xcode中可以显示 xff0c 但是Android Studio里不显示 所以Android可以使用android logger实现日志输出 但是开发中仅使用打印日志的方式进行调试还是不够的
  • 使用jni-rs实现Rust与Android代码互相调用

    本篇主要是介绍如何使用jni rs 有关jni rs内容基于版本0 20 0 xff0c 新版本写法有所不同 入门用法 在Rust库交叉编译以及在Android与iOS中使用中我简单说明了jni rs及demo代码 xff0c 现在接着补充
  • Android 13 变更及适配攻略

    准备工作 首先将我们项目中的 targetSdkVersion和compileSdkVersion 升至 33 影响Android 13上所有应用 1 通知受限 对新安装的应用的影响 xff1a 如果用户在搭载 Android 13 或更高
  • 洛谷 P1185 绘制二叉树

    一道极为恐怖的模拟题 xff0c 以定义函数的方式确定每个点的x xff0c y就能轻松的做出这道题 xff0c 参考神犇题解 洛谷 P1185 KH 39 s blog 洛谷博客 遇到这种题估计就是放弃了 AC代码 xff08 抄的 xf
  • 洛谷 P3366 【模板】最小生成树#Kruskal+并查集

    说了最小生成树 xff0c 那么就用经典的Prim或者Kruskal xff0c 不过Prim实现代码有点多 xff0c 这里用Kruskal举例 注意事项 1 Kruskal是用来找最小生成树的 根据树的定义可以知道 树是无向图 所以Kr
  • STM32MP157AAA3裸机点灯(汇编)

    STM32MP157AAA3裸机点灯 汇编 MP157的A7核裸机点灯 使用的开发板为华清远见的MP157开发板 xff0c 默认板内emmc已经烧写好了uboot 这篇就只记录一下汇编点灯过程 xff0c uboot等内容暂不涉及 xff
  • 用tkinter写出you-get下载器界面,并用pyinstaller打包成exe文件

    写在前面 xff1a 本文为笔者最早于 2019 05 11 23 15 以 64 拼命三郎 的身份发表于博客园 本文为原创文章 xff0c 转载请标明出处 一 you get介绍 you get是一个基于 python3 的下载工具 xf
  • Linux网络协议栈4--bridge收发包

    bridge 是linux上的虚拟交换机 xff0c 具有交换机的功能 网卡收到包后 xff0c 走到 netif receive skb core后 xff0c 剥完vlan找到vlan子接口 xff08 如果有的话 xff09 xff0
  • linux redis启动时报错WARNING overcommit_memory is set to 0! Background save may fail under low memory con

    报错 xff1a WARNING overcommit memory is set to 0 Background save may fail under low memory condition To fix this issue add
  • STM32编程语言介绍

    STM32入门100步 第8期 编程语言介绍 杜洋 洋桃电子 上一期我们在电脑上安装好了KEIL软件 xff0c 也新建了工程 xff0c 在工程中安装了固件库 准备工作完成后 xff0c 接着就是在工程中编写程序了 只有程序使ARM内核有

随机推荐

  • VMware虚拟机安装Linux教程(超详细)

    写给读者 为了帮助Linux系统初学者学习的小伙伴更好的学习 xff0c VMware虚拟机是不可避免的 xff0c 因此下载 安装VMware和完成Linux的系统安装是非常必要的 接下来 xff0c 我们就来系统的学习一下VMware虚
  • Markdown中的LaTeX公式——希腊字母详解

    若要在Markdown中使用 xff0c 则在两个美元符号之间敲入对应LaTeX代码实现公式行显示效果 xff0c 若为公式块 xff0c 则要在四个美元符号中间敲入 xff0c 类似Markdown代码行和代码块 共24个希腊字母 xff
  • FFmpeg学习(一)-- ffmpeg 播放器的基础

    FFmpeg学习 xff08 一 xff09 FFmpeg学习 xff08 二 xff09 FFmpeg学习 xff08 三 xff09 FFmpeg的的是一套可以用来记录 xff0c 转换数字音频 xff0c 视频 xff0c 并能将其转
  • ios Instruments之Allocations

    文章目录 一 span class hljs function Allocations 监测内存分配 span 1 简介 2 如何使用 一 Allocations 1 简介 性能优化中使用Instruments Allocations工具进
  • linux-Centos-7-64位:4、 mysql安装

    从最新版本的Linux系统开始 xff0c 默认的是 Mariadb而不是MySQL xff01 这里依旧以mysql为例进行展示 1 先检查系统是否装有mysql rpm qa span class hljs string style c
  • Win10 WSL忘记用户密码,重置密码

    win10中WSL登录是不用密码的 xff0c 当需要使用用户权限但是忘记密码的时候 xff0c 可以使用如下办法以root身份登录WSL并重置密码 1 以管理员身份打开 PowerShell 2 输入命令 wsl exe user roo
  • 51单片机定时时间的计算

    单片机根据计时 计数模式的不同 xff0c 来进行计算 M1 M0 工作模式 说明 0 0 0 13位计时计数器 xff08 8192 xff09 0 1 1 16位计时计数器 xff08 65536 xff09 1 0 2 8位计时计数器
  • Go语言之禅

    本文翻译自Go社区知名Gopher和博主Dave Cheney的文章 The Zen of Go 本文来自我在GopherCon Israel 2020上的演讲 文章很长 如果您希望阅读精简版 xff0c 请移步到the zen of go
  • UIScrollView及其子类停止滚动的监测

    作为iOS中最重要的滑动控件 UIScrollView居然没有停止滚动的Delegate方法 这有点蛋疼 但是我们可以根据滚动状态来判断是否滚动 span class hljs preprocessor pragma mark scroll
  • PCL库中Marching Cubes(移动立方体)算法的解析

    PCL库中Marching Cubes xff08 移动立方体 xff09 算法解析 1 Marching Cubes算法的原理这里不再赘述 xff0c 不懂的话 xff0c 提供一下文献资源 xff1a 链接 xff1a MARCHING
  • ubuntu18.04安装cuda-10.0和cudnn-7.4.2

    安装cuda 10 0 1 gcc 版本 Ubuntu18 04默认gcc g 43 43 7 3版本 xff0c 如果安装cuda 9并不支持 gcc g 43 43 7 xff0c 所以先降级至6或6以下 我自己的gcc是7 5 0 安
  • Ubuntu安装anaconda3后找不到conda命令

    Ubuntu安装anaconda3后找不到conda命令的原因是没有把anaconda3添加到路径 xff0c 类似于Windows中添加到环境变量 xff0c 所以找不到命令 解决方法是在终端中运行一下命令 xff1a echo 39 e
  • uCharts Y轴格式化

    官方文档 uCharts跨平台图表库 1 Y轴格式化用法 xff1a yAxis data calibration true position 39 left 39 title 39 折线 39 titleFontSize 12 forma
  • C#/.NET Winform 界面库UI推荐

    以下是C CSkin界面库的官方板块 xff1a http bbs cskin net thread 622 1 1 html 几款开源的Windows界面库 https blog csdn net blade2001 article de
  • layui中实现按钮点击事件

    首先 xff0c 小编要告诉大家一个残酷的现实 xff0c 那就是小编没有找到layui对点击事件的支持 这里的点击事件是指单纯的点击事件 xff0c 而不是提交事件 xff0c 或者是数据表格中内嵌的button xff0c 对于这两者
  • C# devexpress gridcontrol 分页 控件制作

    这个小小的功能实现起来还是有一点点复杂 分页单独一个usercontrol 出来 导致查询换页 与gridcontrol页面分离 一般通过换页事件通知girdcontrol 做出查询 查询来说有时是查询所有 有时是查询一个月 或者别的时间
  • SQL Server 创建索引(CREATE NONCLUSTERED INDEX )

    索引的简介 xff1a 索引分为聚集索引和非聚集索引 xff0c 数据库中的索引类似于一本书的目录 xff0c 在一本书中通过目录可以快速找到你想要的信息 xff0c 而不需要读完全书 索引主要目的是提高了SQL Server系统的性能 x
  • .NET Core/.NET5/.NET6 开源项目汇总:(权限)管理系统

    前言 企业管理系统一般包含后台管理UI 组织机构管理 权限管理 日志 数据访问 表单 工作流等常用必备功能 下面收集的几款优秀开源的管理系统 xff0c 值得大家入门学习 如有新的优秀项目 xff0c 我会不断补充 开源项目是众多组织与个人
  • Nginx配置指令(一)

    1 daemon 语法 xff1a daemon on off 默认 xff1a on 如果使用daemon off xff0c nginx将会运行在前台 生产远景不建议如此使用 xff0c 虽然可以 2 env 语法 xff1a env
  • SQL将Json字符串转为表格

    支持复杂结构的使用 使用Parent ID来对应Object ID产生关系就好 实现对Json数据的从文字到表变量的转换 例 34 FieldName 34 34 DateKey 34 34 Title 34 34 汇总后日期 34 34