Server版本中有什么触发器

日期:2019-09-28编辑作者:北京pk10官网-数据库

背景

  上一篇中,作者介绍了SQL Server 允许访谈数据库的元数据,为啥有元数据,怎么着使用元数据。这一篇中作者会介绍如何特别找到各样有价值的信息。以触发器为例,因为它们往往一同相当多难题。

 

那么怎么样找到触发器的多寡?

*  以sys.system_views*is表最初。让我们询问出数据库中应用触发器的信息。可以告诉您日前SQL Server版本中有何样触发器。

SELECT schema_name(schema_ID)+'.'+ name

  FROM sys.system_views WHERE name LIKE '%trigger%'

 ----------------------------------------

sys.dm_exec_trigger_stats              

sys.server_trigger_events              

sys.server_triggers                    

sys.trigger_event_types                

sys.trigger_events                     

sys.triggers                           



(6 row(s) affected)

  个中sys.triggers看起来音信比非常多,它又包罗怎样列?上边那几个查询很轻松查到:

 SELECT Thecol.name+ ' '+ Type_name(TheCol.system_type_id)

  + CASE WHEN TheCol.is_nullable=1 THEN ' NULL' ELSE ' NOT NULL' END as Column_Information

FROM sys.system_views AS TheView

  INNER JOIN sys.system_columns AS TheCol

    ON TheView.object_ID=TheCol.Object_ID

  WHERE  TheView.name = 'triggers'

  ORDER BY column_ID;

结果如下:

 Column_Information

----------------------------------------

name nvarchar NOT NULL

object_id int NOT NULL

parent_class tinyint NOT NULL

parent_class_desc nvarchar NULL

parent_id int NOT NULL

type char NOT NULL

type_desc nvarchar NULL

create_date datetime NOT NULL

modify_date datetime NOT NULL

is_ms_shipped bit NOT NULL

is_disabled bit NOT NULL

is_not_for_replication bit NOT NULL

is_instead_of_trigger bit NOT NULL

 

由此我们多那么些音讯有了更加好的敞亮,有了四个目录的目录。那些概念有一点点令人头晕,不过另一方面,它也是极其轻易的。我们能够意识到元数据,再找个查询中,要求做的正是退换这些单词‘triggers’来搜求你想要的视图名称。.

在二零一一及其现在版本,能够行使二个新的表值函数非常大地简化上述查询,并得避防止各个连接。在上面包车型地铁查询中,我们将寻觅sys.triggers 视图 中的列。能够行使同一的询问通过更动字符串中的对象名称来获取别的视图的概念。

 SELECT name+ ' '+ system_type_name

  + CASE WHEN is_nullable=1 THEN ' NULL' ELSE ' NOT NULL' END as Column_Information

FROM sys.dm_exec_describe_first_result_set

  ( N'SELECT * FROM sys.triggers;', NULL, 0) AS f

  ORDER BY column_ordinal;

询问结果如下:

 Column_Information

----------------------------------------

name nvarchar(128) NOT NULL

object_id int NOT NULL

parent_class tinyint NOT NULL

parent_class_desc nvarchar(60) NULL

parent_id int NOT NULL

type char(2) NOT NULL

type_desc nvarchar(60) NULL

create_date datetime NOT NULL

modify_date datetime NOT NULL

is_ms_shipped bit NOT NULL

is_disabled bit NOT NULL

is_not_for_replication bit NOT NULL

is_instead_of_trigger bit NOT NULL

 

sys.dm_exec_describe_first_result_set函数的最大优势在于你能见到任何结果的列,不仅是表和视图、存款和储蓄进度照旧贬值函数。

为了查出任何列的音讯,你能够运用稍微修改的本子,只供给改换代码中的字符串'sys.triggers'就可以,如下:

 Declare @TheParamater nvarchar(255)

Select @TheParamater = 'sys.triggers'

Select @TheParamater = 'SELECT * FROM ' + @TheParamater

SELECT

  name+ ' '+ system_type_name

  + CASE WHEN is_nullable=1 THEN ' NULL' ELSE ' NOT NULL' END as Column_Information

FROM sys.dm_exec_describe_first_result_set

  ( @TheParamater, NULL, 0) AS f

  ORDER BY column_ordinal;

可是当然三个触发器是率先是一个目的,因而一定在sys.objects?

  在大家运用sys.triggers的消息在此以前,必要来重新一次,全部的数据库对象都设有于sys.objects中,在SQL Server 中的对象满含以下:聚合的CL翼虎函数,check 约束,SQL标量函数,CLCRUISER标量函数,CLEnclave表值函数,SQL内联表值函数,内部表,SQL存款和储蓄进度,CLTiggo存款和储蓄进度,安排指南,主键约束,老式准绳,复制过滤程序,系统基础表,同义词,连串对象,服务队列,CL途胜DML 触发器,SQL表值函数,表类型,顾客自定义表,独一约束,视图和扩张存款和储蓄进度等。

  触发器是目的所以基础消息一定保存在sys.objects。不幸运的是,有时大家要求卓殊的音讯,那几个新闻能够透过目录视图查询。这个额外数据有是怎么吗?

 

  修改大家运用过的询问,来询问sys.triggers的列,本次我们会见到额外信息。那几个额外列是缘于于sys.objects。

 SELECT coalesce(trigger_column.name,'NOT INCLUDED') AS In_Sys_Triggers,

       coalesce(object_column.name,'NOT INCLUDED') AS In_Sys_Objects

FROM

 (SELECT Thecol.name

  FROM sys.system_views AS TheView

    INNER JOIN sys.system_columns AS TheCol

      ON TheView.object_ID=TheCol.Object_ID

  WHERE  TheView.name = 'triggers') trigger_column

FULL OUTER JOIN

 (SELECT Thecol.name

  FROM sys.system_views AS TheView

    INNER JOIN sys.system_columns AS TheCol

      ON TheView.object_ID=TheCol.Object_ID

  WHERE  TheView.name = 'objects') object_column

ON trigger_column.name=object_column.name

查询结果:

In_Sys_Triggers                In_Sys_Objects

------------------------------ ----------------------

name                           name

object_id                      object_id

NOT INCLUDED                   principal_id

NOT INCLUDED                   schema_id

NOT INCLUDED                   parent_object_id

type                           type

type_desc                      type_desc

create_date                    create_date

modify_date                    modify_date

is_ms_shipped                  is_ms_shipped

NOT INCLUDED                   is_published

NOT INCLUDED                   is_schema_published

is_not_for_replication         NOT INCLUDED

is_instead_of_trigger          NOT INCLUDED

parent_id                      NOT INCLUDED

is_disabled                    NOT INCLUDED

parent_class                   NOT INCLUDED

parent_class_desc              NOT INCLUDED

 

如上那些让大家精晓在sys.triggers的附加消息,不过因为它一直是表的子对象,所以某个不相干音讯是不会来得在这个钦赐的视图只怕sys.triggers中的。以往快要带大家去承继找找那么些音信。

触发器的标题

  触发器是实用的,然而因为它们在SSMS对象能源管理器窗格中不是可知的,所以常常用来提醒错误。触发器一时候会稍稍微妙的地点让其出难题,比如,当导入进程中禁用了触发器,况且由于一些原因他们尚未重启。

上边是三个关于触发器的回顾提示:

  触发器可以在视图,表或然服务器上,任何这么些指标上都足以有超过1个触发器。普通的DML触发器能被定义来举行替代一些数目修改(Insert,Update或许Delete)大概在数码修改今后推行。每八个触发器与只与四个目的管理。DDL触发器与数据库关联或然被定义在服务器品级,那类触发器日常在Create,Alter或然Drop那类SQL语句实践后触发。

  像DML触发器一样,能够有多少个DDL触发器被创制在同一个T-SQL语句上。二个DDL触发器和说话触发它的讲话在同贰个事务中运作,所以除了Alter DATABASE之外都得以被回滚。DDL触发器运维在T-SQL语句实践完成后,约等于不能够作为Instead OF触发器使用。

  二种触发器都与事件有关,在DML触发器中,满含INSERT, UPDATE, 和DELETE,然则无数事变都得以与DDL触发器关联,稍后大家将驾驭。

在数据库中列出触发器

那就是说怎么获取触发器列表?下边笔者在AdventureWorks数据库中开展查询,注意该库的视图中并未触发器。

率先个查询全部消息都在sys.triggers 的目录视图中。

SELECT

  name AS TriggerName,

  coalesce(object_schema_name(parent_ID)+'.'

    +object_name(parent_ID),'Database ('+db_name()+')') AS TheParent

FROM sys.triggers;



TriggerName                    TheParent

------------------------------ ----------------------------------------

ddlDatabaseTriggerLog          Database (AdventureWorks2012)          

dEmployee                      HumanResources.Employee                

iuPerson                       Person.Person                          

iPurchaseOrderDetail           Purchasing.PurchaseOrderDetail         

uPurchaseOrderDetail           Purchasing.PurchaseOrderDetail         

uPurchaseOrderHeader           Purchasing.PurchaseOrderHeader         

iduSalesOrderDetail            Sales.SalesOrderDetail                 

uSalesOrderHeader              Sales.SalesOrderHeader                 

dVendor                        Purchasing.Vendor                      

iWorkOrder                     Production.WorkOrder                   

uWorkOrder                     Production.WorkOrder   

  笔者动用元数据函数db_name()使SQL保持轻便。db_name()告诉本身数据库的称呼。object_schema_name()用来查询object_ID代表的靶子的架构,以及object_name**()**查询对象名称。这个对指标的引用指向触发器的主人,触发器可以是数据库本人,也得以是表:服务器触发器有投机的系统视图,稍后小编会议及展览示。

设若想要看见有着触发器,那么大家最棒使用sys.objects 视图:

SELECT name as TriggerName, object_schema_name(parent_object_ID)+'.'

    +object_name(parent_object_ID) AS TheParent

            FROM   sys.objects

           WHERE  OBJECTPROPERTYEX(object_id,'IsTrigger') = 1

 

潜心,输出不分包数据库等级的触发器,因为具有的DML触发器都在sys.objects视图中,不过你会管窥之见在sys.triggers视图中的触发器。

下面查询结果:

name                           TheParent

------------------------------ -------------------------------

dEmployee                      HumanResources.Employee

iuPerson                       Person.Person

iPurchaseOrderDetail           Purchasing.PurchaseOrderDetail

uPurchaseOrderDetail           Purchasing.PurchaseOrderDetail

uPurchaseOrderHeader           Purchasing.PurchaseOrderHeader

iduSalesOrderDetail            Sales.SalesOrderDetail

uSalesOrderHeader              Sales.SalesOrderHeader

dVendor                        Purchasing.Vendor

iWorkOrder                     Production.WorkOrder

uWorkOrder                     Production.WorkOrder

 

本人的表和视图有稍许个触发器?

本身想知道各样表有几个触发器,况兼什么景况下接触它们。上面大家列出了富有触发器的表以及各种事件的触发器数量。每种表也许视图对于触发器行为都有一个INSTEAD OF 触发器,也许是UPDATE, DELETE, 恐怕 INSERT

。可是贰个表能够有三个AFTEENCORE触发器行为。那一个将体未来下边的查询中(排除视图):

SELECT

convert(CHAR(32),coalesce(object_schema_name(parent_ID)+'.'

    +object_name(parent_ID),'Database ('+db_name()+')')) AS 'Table', triggers,[KD1] [AC2] 

convert(SMALLINT,objectpropertyex(parent_ID, N'TABLEDeleteTriggerCount')) AS 'Delete',

convert(SMALLINT,objectpropertyex(parent_ID, N'TABLEInsertTriggerCount')) AS 'Insert',

convert(SMALLINT,objectpropertyex(parent_ID, N'TABLEUpdateTriggerCount')) AS 'Update'

FROM (SELECT count(*) AS triggers, parent_ID FROM sys.triggers

      WHERE objectpropertyex(parent_ID, N'IsTable') =1

         GROUP BY parent_ID

          )TablesOnly;

--查询结果如下:

Table                            triggers    Delete Insert Update

-------------------------------- ----------- ------ ------ ------

Purchasing.Vendor                1           0      0      0

Production.WorkOrder             2           0      1      1

Purchasing.PurchaseOrderDetail   2           0      1      1

Purchasing.PurchaseOrderHeader   1           0      0      1

Sales.SalesOrderDetail           1           1      1      1

HumanResources.Employee          1           0      0      0

Sales.SalesOrderHeader           1           0      0      1

Person.Person                    1           0      1      1



(8 row(s) affected)

只要跨越三个触发器被触发在一个表上,它们不保证顺序,当然也得以选取sp_settriggerorder来支配顺序。通过动用objectpropertyex()元数据函数,需求基于事件输入参数‘ExecIsLastDeleteTrigger’, ‘ExecIsLastInsertTrigger’ 或许‘ExecIsLastUpdateTrigger’来认同何人是最终二个实践的触发器 。为了博取第三个触发器,酌情选用ObjectPropertyEx() 元数据函数,需求输入参数 ‘ExecIsFirstDeleteTrigger’, ‘ExecIsFirstInsertTrigger’ 或许 ‘ExecIsFirstUpdateTrigger’。

由此大家现在精通了表有哪些触发器,哪些事件触发这个触发器。可以动用objectpropertyex()元数据函数,那些函数重返相当多见仁见智新闻,根据钦定的参数分化。通过查看MSDN中的文书档案,查看里面包车型大巴一个文档是或不是有帮助元数据查询,总是值得检查的。

触发器什么时候触发事件?

让咱们看一下这一个触发器,DML触发器能够在富有其余时间发出后触发,但是足以在封锁被拍卖前而且触发INSTEAD OF触发动作。上面大家就来看看全体的触及的到底是AFTE奥德赛 如故INSTEAD OF 触发器,有事什么时直接触了触发器。

/* 列出触发器,无论它们是否启用,以及触发器事件。*/

SELECT

  convert(CHAR(25),name) AS triggerName,

  convert(CHAR(32),coalesce(object_schema_name(parent_ID)+'.'

    +object_name(parent_ID),'Database ('+db_name()+')')) AS TheParent,

       is_disabled,

       CASE WHEN is_instead_of_trigger=1 THEN 'INSTEAD OF ' ELSE 'AFTER ' END

       +Stuff (--get a list of events for each trigger

        (SELECT ', '+type_desc FROM sys.trigger_events te

           WHERE te.object_ID=sys.triggers.object_ID

         FOR XML PATH(''), TYPE).value('.', 'varchar(max)'),1,2,'') AS events

 FROM sys.triggers;

结果如下:

triggerName               TheParent                        is_disabled events

------------------------- -------------------------------- ----------- ---------

ddlDatabaseTriggerLog     Database (AdventureWorks2012)    1           AFTER CREATE_TABLE, ALTER_TABLE, DROP_TABLE, CREATE_VIEW, ALTER_VIEW, DROP_VIEW, CREATE_INDEX, ALTER_INDEX, DROP_INDEX, CREATE_XML_INDEX, ALTER_FULLTEXT_INDEX, CREATE_FULLTEXT_INDEX, DROP_FULLTEXT_INDEX, CREATE_SPATIAL_INDEX, CREATE_STATISTICS, UPDATE_STAT

t_AB                      dbo.AB                           0           INSTEAD OF INSERT

dEmployee                 HumanResources.Employee          0           INSTEAD OF DELETE

iuPerson                  Person.Person                    0           AFTER INSERT, UPDATE

iPurchaseOrderDetail      Purchasing.PurchaseOrderDetail   0           AFTER INSERT

uPurchaseOrderDetail      Purchasing.PurchaseOrderDetail   0           AFTER UPDATE

uPurchaseOrderHeader      Purchasing.PurchaseOrderHeader   0           AFTER UPDATE

iduSalesOrderDetail       Sales.SalesOrderDetail           0           AFTER INSERT, UPDATE, DELETE

uSalesOrderHeader         Sales.SalesOrderHeader           0           AFTER UPDATE

dVendor                   Purchasing.Vendor                0           INSTEAD OF DELETE

iWorkOrder                Production.WorkOrder             0           AFTER INSERT

uWorkOrder                Production.WorkOrder             0           AFTER UPDATE

 

As you will notice, we used a FOR XML PATH(‘’) trick here to make a list of the events for each trigger to make it easier to read. These events were pulled from the sys.trigger_events view using a correlated subquery.

瞩目到大家应用了FOR XML PATH(‘’)来列出事件的每一个触发器,更易于读取精通。sys.trigger_events利用相关子查询来询问这个事件。

触发器的多少长度?

成都百货上千数据库人士不赞成冗长触发器的定义,但她们或者会开掘,依照定义的尺寸排序的触发器列表是切磋数据库的一种有用艺术。

SELECT convert(CHAR(32),coalesce(object_schema_name(t.object_ID)+'.','')

    +name) AS TheTrigger,

       convert(CHAR(32),coalesce(object_schema_name(parent_ID)+'.'

    +object_name(parent_ID),'Database ('+db_name()+')')) AS theParent,

       len(definition) AS length --the length of the definition

FROM sys.SQL_modules m

  INNER JOIN sys.triggers t

    ON t.object_ID=m.object_ID

ORDER BY length DESC;

访问sys.SQL_modules视图能够查阅触发器定义的SQL DDL,并按大小顺体系出它们,最上边是最大的。

结果:

TheTrigger                       theParent                        length

-------------------------------- -------------------------------- --------

Sales.iduSalesOrderDetail        Sales.SalesOrderDetail           3666

Sales.uSalesOrderHeader          Sales.SalesOrderHeader           2907

Purchasing.uPurchaseOrderDetail  Purchasing.PurchaseOrderDetail   2657

Purchasing.iPurchaseOrderDetail  Purchasing.PurchaseOrderDetail   1967

Person.iuPerson                  Person.Person                    1498

ddlDatabaseTriggerLog            Database (AdventureWorks2012)    1235

Purchasing.dVendor               Purchasing.Vendor                1103

Production.uWorkOrder            Production.WorkOrder             1103

Purchasing.uPurchaseOrderHeader  Purchasing.PurchaseOrderHeader   1085

Production.iWorkOrder            Production.WorkOrder             1011

HumanResources.dEmployee         HumanResources.Employee          604

 

好啊,笔者说不定太责备了,不太喜欢太长的,可是逻辑偶尔候会非常短。事实上,前三名在作者眼里是不可靠赖的,即使本身连连偏向于尽恐怕少地动用触发器。

那个触发器访问了不怎么对象

在代码中,各类触发器要访谈多少对象(比方表和函数)?

大家只需求检讨表达式注重项。这一个查询利用三个视图来列出“软”信任项(如触发器、视图和函数)。

SELECT coalesce(object_schema_name(parent_id)

          +'.','')+convert(CHAR(32),name) AS TheTrigger,

          count(*) AS Dependencies

FROM sys.triggers

INNER JOIN sys.SQL_Expression_dependencies

ON [referencing_id]=object_ID

GROUP BY name, parent_id

ORDER BY count(*) DESC;
--结果:

TheTrigger                               Dependencies

---------------------------------------- ------------

Sales.iduSalesOrderDetail                7

Sales.uSalesOrderHeader                  7

Purchasing.iPurchaseOrderDetail          5

Purchasing.uPurchaseOrderDetail          5

Purchasing.uPurchaseOrderHeader          3

Production.iWorkOrder                    3

Production.uWorkOrder                    3

dbo.t_AB                                 2

Purchasing.dVendor                       2

Person.iuPerson                          2

ddlDatabaseTriggerLog                    1

 

居然有五个触发器有7个凭借!让我们就Sales.iduSalesOrderDetail来其实看一下,有怎么样注重。

特定触发器访问依然写入哪些对象?

我们得以列出触发器在代码中援用的全体目的

SELECT

  convert(char(32),name) as TheTrigger,

  convert(char(32),coalesce([referenced_server_name]+'.','')

            +coalesce([referenced_database_name]+'.','')

       +coalesce([referenced_schema_name]+'.','')+[referenced_entity_name])
     as referencedObject

FROM sys.triggers

INNER JOIN sys.SQL_Expression_dependencies

ON [referencing_id]=object_ID

WHERE name LIKE 'iduSalesOrderDetail';

--查询结果:

TheTrigger                       referencedObject

-------------------------------- --------------------------------

iduSalesOrderDetail              Sales.Customer                 

iduSalesOrderDetail              Person.Person                  

iduSalesOrderDetail              Sales.SalesOrderDetail         

iduSalesOrderDetail              Sales.SalesOrderHeader          

iduSalesOrderDetail              Production.TransactionHistory  

iduSalesOrderDetail              dbo.uspLogError                

iduSalesOrderDetail              dbo.uspPrintError

 

触发器里有哪些代码?

到现在让大家因而检查触发器的源代码来认同这或多或少。.

SELECT OBJECT_DEFINITION ( object_id('sales.iduSalesOrderDetail') ); 

咱俩前面的询问是没有错的,扫描源码可见全体的倚重项。多量凭仗项表名对于数据库的重构等急需相当小心,比如,修改八个基础表的列。

据须要做什么,您恐怕希望检查来自元数据视图的定义,并不是选择OBJECT_DEFINITION函数。

 SELECT definition

FROM sys.SQL_modules m

  INNER JOIN sys.triggers t

    ON t.object_ID=m.object_ID

WHERE t.object_ID=object_id('sales.iduSalesOrderDetail');

追寻触发器的代码

There are always plenty of ways of using the metadata views and functions. I wonder if all these triggers are executing that uspPrintError procedure?

有多数利用元数据视图和函数的形式。想清楚是或不是持有那几个触发器都实行uspPrintError存储进度?

/* 在装有触发器中搜索字符串 */

 

SELECT convert(CHAR(32),coalesce(object_schema_name(object_ID)+'.','')

    +name) AS TheTrigger, '...'+substring(definition, hit-20,120) +'...'

FROM

  (SELECT name, definition, t.object_ID, charindex('EXECUTE [dbo].[uspPrintError]',definition) AS hit

   FROM sys.SQL_modules m

     INNER JOIN sys.triggers t

       ON t.object_ID=m.object_ID)f

WHERE hit>0; 

 

结果如图:

图片 1

 

8个援用正在实践那个历程。大家在sys.SQL_modules中检索了独具的概念能够找到二个特定的字符串,这种方法异常的慢很暴力,然而它是便宜的!

在具有目的中搜索字符串

自己想明白除了触发器之外是不是还会有别的对象调用这些历程?大家多少修改查询以搜寻sys.objects视图,而不是sys.triggers,以找出全数具备与之提到的代码的目的。大家还索要出示对象的种类

/* 在享有指标中追寻字符串 */

 SELECT convert(CHAR(32),coalesce(object_schema_name(object_ID)+'.','')

    +object_name(object_ID)) AS TheObject, type_desc, '...'+substring(definition,hit-20,120)+'...' as TheExtract

FROM

  (SELECT  type_desc, definition, o.object_ID, charindex('uspPrintError',definition) AS hit

   FROM sys.SQL_modules m

     INNER JOIN sys.objects o

       ON o.object_ID=m.object_ID)f

WHERE hit>0; 

询问结果如下图:

图片 2

 From this output we can see that, other than the procedure itself where it is defined, and the triggers, only dbo.uspLogError is executing the uspPrintError procedure. (see the first column, second line down)

从那几个输出中我们得以看出,除了在概念它的进度自个儿之外,还会有触发器,独有dbo.uspLogError正值执行uspPrintError进程。(见第一列,第二行往下)

列出劳动器级触发器及其定义

笔者们得以因此系统视图掌握它们啊?嗯,是的。以下是列出服务器触发器及其定义的言语

 SELECT name, definition

FROM sys.server_SQL_modules m

  INNER JOIN sys.server_triggers t

ON t.object_ID=m.object_ID; 

小心,只好看看有权力看的触发器

总结

  本文商讨过触发器,並且你能摸清触发器,以及潜在的难题。这里并从未针对有关触发器的询问提供贰个完美的工具箱,因为自个儿只是利用触发器作为示范来呈现在询问系统视图时大概选取的一些能力。在我们学习了目录、列和参数之后,大家将回来触发器,并询问了编写制定访谈系统视图和information schema视图的查询的局地家常用途。表是元数据的成都百货上千方面包车型大巴基本功。它们是几体系型的目的的父类,其余元数据如索引是表的属性。大家正在逐步地努力去开掘装有有关表的音信。期望下一期

本文由北京pk赛车官网下载发布于北京pk10官网-数据库,转载请注明出处:Server版本中有什么触发器

关键词:

B-Tree上查找算法的伪代码如下

数据库索引的特点: 避免进行数据库全表的扫描,大多数情况,只需要扫描较少的索引页和数据页,而不是查询所有...

详细>>

分拆后结果如下

有表tb, 如下: id value 1 aa,bb 2 aaa,bbb,ccc 欲按id,分拆value列, 分拆后结果如下: id value 1 aa 1 bb 2 aaa 2 bbb 2 ccc --方法1.使用x...

详细>>

此短信平台

此短信平台,支持法国wavecom短信猫.有VB及DELPHI示例程序   错误说明 0 成功 -1 连接短信平台失败 -2 命令执行失败 -3...

详细>>

实现思路

摘要: 下文讲述使用sql脚本的方法判断字符串为大小写的方法分享,如下所示 实验环境:sqlserver 2008 R2 实现思路: 将字...

详细>>