随笔分类 -  SQL

摘要:SQL Server用户权限查询 阅读全文 »
posted @ 2024-03-01 14:11 vvull 阅读(32) 评论(0) 推荐(0) 编辑
摘要:> [FORMAT (Transact-SQL)](https://learn.microsoft.com/zh-cn/sql/t-sql/functions/format-transact-sql?view=sql-server-ver16&redirectedfrom=MSDN) 阅读全文 »
posted @ 2023-08-22 17:59 vvull 阅读(7) 评论(0) 推荐(0) 编辑
摘要:# 可查看定义(design) ``` USE [DB Name] GRANT VIEW DEFINITION ON SCHEMA::[dbo] TO [vvull] GO ``` # 可执行(exec) ``` USE [DB Name] GRANT EXECUTE ON SCHEMA::[dbo 阅读全文 »
posted @ 2023-08-08 14:34 vvull 阅读(49) 评论(0) 推荐(0) 编辑
摘要:> [How to Run SSMS as a different user](https://www.sqlserver-dba.com/2021/11/run-ssms-as-a-different-user.html) 以其他用户身份运行是可用的 它实际上是可用的,但不是右键单击,而是使用 S 阅读全文 »
posted @ 2023-06-14 16:00 vvull 阅读(15) 评论(0) 推荐(0) 编辑
摘要:因为IT说SQL Server兼容级别高影响性能,所以改用XML OPENXML (SQL Server) OPENXML (Transact-SQL) 阅读全文 »
posted @ 2023-03-06 14:16 vvull 阅读(82) 评论(0) 推荐(0) 编辑
摘要:通过SSIS的“查找”组件进行不同数据源之间数据的合并操作 阅读全文 »
posted @ 2023-02-24 11:05 vvull 阅读(54) 评论(0) 推荐(0) 编辑
摘要:类库 using Microsoft.SqlServer.Server; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using Syste 阅读全文 »
posted @ 2023-02-09 09:20 vvull 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Sqlserver 中 CrossApply 和 inner join 的区别 cross apply和inner join有很多相同处,都是为了联表查询数据,而且取两张表之间的交集,不同在于,cross apply可以在右表中加入左表的字段作为条件。 阅读全文 »
posted @ 2023-02-08 17:34 vvull 阅读(80) 评论(0) 推荐(0) 编辑
摘要:SQLSERVER调用WebAPI和WebService SqlServer调用webapi和webService接口 declare @url nvarchar(max) set @url = 'http://XXX/GetToken' --API地址 declare @pms nvarchar( 阅读全文 »
posted @ 2023-02-07 17:06 vvull 阅读(303) 评论(0) 推荐(0) 编辑
摘要:Sql Server 处理 Json 相关技术 SQL Server 中的 JSON 数据 阅读全文 »
posted @ 2023-02-07 10:50 vvull 阅读(41) 评论(0) 推荐(0) 编辑
摘要:设置Sql Agent运行Job时的执行账户 阅读全文 »
posted @ 2022-12-02 15:20 vvull 阅读(47) 评论(0) 推荐(0) 编辑
摘要:SQL SERVER 查询Job作业基本信息及执行情况 阅读全文 »
posted @ 2022-11-30 14:32 vvull 阅读(115) 评论(0) 推荐(0) 编辑
摘要:Sql Server Service Broker 阅读全文 »
posted @ 2022-04-15 11:17 vvull 阅读(32) 评论(0) 推荐(0) 编辑
摘要:SqlServer中计算列详解 计算列区别于需要我们手动或者程序给予赋值的列,它的值来源于该表中其它列的计算值。比如,一个表中包含有数量列Number与单价列Price,我们就可以创建计算列金额Amount来表示数量*单价的结果值,创建Amount列后,在程序中需要使用计算金额这个值时,就不用取出N 阅读全文 »
posted @ 2022-04-15 11:10 vvull 阅读(478) 评论(0) 推荐(0) 编辑
摘要:SQL中declare变量的作用域 declare变量的作用域是所在的批处理,if阻断不了它的作用域 阅读全文 »
posted @ 2022-02-22 17:11 vvull 阅读(85) 评论(0) 推荐(0) 编辑
摘要:SQL SERVER 查看所有存储过程或视图里包含某个关键字的查询语句 select [name] ,[xtype] from sysobjects o ,syscomments s where o.id = s.id and text LIKE '关键字' order by name asc 阅读全文 »
posted @ 2022-02-14 10:53 vvull 阅读(220) 评论(0) 推荐(0) 编辑
摘要:sp_executesql的用法 sp_executesql介绍和使用 示例 create proc [dbo].[usp_Test] @StartTime datetime ,@EndTime datetime ,@TestOutput int output as begin --定义动态SQL和 阅读全文 »
posted @ 2022-02-10 15:37 vvull 阅读(84) 评论(0) 推荐(0) 编辑
摘要:The transaction log for database 'DBName' is full due to 'LOG_BACKUP'. 查看log使用空间 dbcc sqlperf(logspace) 收缩日志 USE[master] ALTER DATABASE 数据库名 SET RECOV 阅读全文 »
posted @ 2021-11-04 16:09 vvull 阅读(442) 评论(0) 推荐(0) 编辑
摘要:替换SQL字段中的换行符,回车符 select char(9) --Tab select char(10) --换行符 select char(13) --回车键 阅读全文 »
posted @ 2021-10-14 17:06 vvull 阅读(2879) 评论(0) 推荐(0) 编辑
摘要:创建Function Create FUNCTION [dbo].[SplitStr] (@List nvarchar(max) ,@Delim varchar(255)) RETURNS TABLE AS RETURN ( SELECT [Value] FROM ( SELECT [Value] 阅读全文 »
posted @ 2021-09-17 08:45 vvull 阅读(39) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示