SQL SERVER CLR的优势

编程入门 行业动态 更新时间:2024-10-26 20:23:47
本文介绍了SQL SERVER CLR的优势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

与T-SQL相比,SQLServer CLR提供了哪些优势?使用.NET语法比使用T-SQL更容易吗?我知道您可以定义用户类型,但是我不清楚为什么更好。例如,您可以定义一个电子邮件类型,它具有前缀属性和域属性。然后,您可以搜索域或前缀或两者。但是,我看不出与添加几列(分别称为前缀和域)并分别搜索它们有什么不同。也许有人有现实的理由为什么这样做会更好。

What advantages does SQLServer CLR offer over T-SQL? Is using .NET syntax easier than T-SQL? I see that you can define user types, but I'm not quite clear on why that's better. For example, you could define an email type and it would have a prefix property and a domain property. You could then search on domain or prefix or both. However, I don't see how that's any different from adding a couple of columns one called prefix and one called domain and searching on them individually. Maybe someone has real world reasons why this is better.

推荐答案

我举一个很好的例子:CLR具有内置的RegEx对象,SQL Server中非常缺乏。现在编写函数来进行基于正则表达式的验证约束/修复是很简单的。

I'll give one good example: CLR has a built in RegEx object, which is sorely lacking in SQL Server. Now it's trivial to write functions to do regex-based validation constraints/repairs.

更多推荐

SQL SERVER CLR的优势

本文发布于:2023-10-28 13:17:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1536740.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:优势   SQL   SERVER   CLR

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!