现在的位置: 首页 > 综合 > 正文

SQL.CLR

2012年12月24日 ⁄ 综合 ⁄ 共 809字 ⁄ 字号 评论关闭

1 create a CLR User-defined function.

(1) create a Database -- SQL Server Project; Add a new item(User-defined function); Wirte a helloword function

Udf helloworld

 

(2) build the project. get the relative assembly(*.dll)

(3) Open the SSMS. Select one database, expand the menu, get the "Assemblies" node, right click, "New assembly", import the previoud assembly. set the other options if possible.

(4) Create one SQL Function, which call the udf in the assembly

Sql function

 

(5) Use the created function

call the udf

抱歉!评论已关闭.