CREATE TABLE [dbo].[Com_Province]( [Com_ProvinceId] [uniqueidentifier] NOT NULL, [Code] [nvarchar](50) NULL, [Name] [nvarchar](50) NULL, [ParentCode] ...
分类:
其他好文 时间:
2018-01-29 19:16:40
阅读次数:
635
原文:SqlServer删除复制监视器中无效的发布名称 在服务器复制监视器中有一个发布名称,因为该发布订阅已经删除。 ReportServerTempDB只有一个发布,已无效,打算删除。 --直接删除表记录 select * from dbo.MSsnapshot_agents where publ... ...
分类:
数据库 时间:
2018-01-26 20:51:23
阅读次数:
290
原文:SQLServer 进程无法向表进行大容量复制 模拟出来的问题,这里记录下来吧。 事物复制中,发布的表有一字段允许为null,并且该字段存在null值。而自己在订阅中先创建该表,并且把这个字段该为not null,结果出现了以下的错误。 错误消息: 进程无法向表“"dbo"."MyTable"... ...
分类:
数据库 时间:
2018-01-26 20:48:53
阅读次数:
437
ALTER function [dbo].[getStaLike](@sex NVARCHAR,@active NVARCHAR,@age decimal,@HEIGHT decimal,@WEIGHT decimal)returns NVARCHAR(64)as begin return(sele ...
分类:
数据库 时间:
2018-01-23 20:22:54
阅读次数:
160
一、SQL中的语法 1、drop table 表名称 eg: drop table dbo.Sys_Test 2、truncate table 表名称 eg: truncate table dbo.Sys_Test 3、delete from 表名称 where 列名称 = 值 eg: delete ...
分类:
数据库 时间:
2018-01-23 15:47:41
阅读次数:
159
exec sp_configure 'show advanced options',1reconfigureexec sp_configure 'Ad Hoc Distributed Queries',1reconfigureGOselect * into BookHouse.dbo.B_Bank ...
分类:
数据库 时间:
2018-01-18 00:53:30
阅读次数:
206
CREATE FUNCTION dbo.sf_DS_SplitNVarchar ( @strValues nvarchar(4000) ) RETURNS @tblStrList TABLE (id int identity(1,1),value nvarchar(4000)) AS BEGIN d ...
分类:
数据库 时间:
2018-01-17 13:45:35
阅读次数:
185
--【提取中文】 IF OBJECT_ID('dbo.fun_getCN') IS NOT NULL DROP FUNCTION dbo.fun_getCN GO create function dbo.fun_getCN(@str varchar(4000)) returns varchar(40 ...
分类:
数据库 时间:
2018-01-17 13:41:14
阅读次数:
238
create function [dbo].[fun_getbh](@char nchar(2)) returns int as begin return( case when unicode(@char) between 19968 and 40869 then( select top 1 id ...
分类:
数据库 时间:
2018-01-17 12:31:27
阅读次数:
191
查询数据库空间分配情况: 1 use master 2 go 3 create procedure dbo.proc_getdbspaceused 4 as 5 begin 6 set nocount on 7 create table #dbsize( 8 database_id int 9 ,d ...
分类:
数据库 时间:
2018-01-17 00:09:16
阅读次数:
224