ms sql中没有返回类型的函数 [英] Function with no return type in ms sql

查看:73
本文介绍了ms sql中没有返回类型的函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我想在ms sql中编写一个函数,但是它不会返回任何东西,并且我想在另一个查询中调用它.但是我没有得到没有返回类型的函数编写方法.如果可能的话,请帮我.
谢谢.

Hi everybody,
I want to write a function in ms sql , but it wont return any thing, and i want to call it in another query.But i am not getting how to write a function without return type.If it is possible then pls help me.
Thanking you.

推荐答案

函数的全部重点是返回一些东西.如果什么都不返回,为什么要调用它呢?您可以返回自己喜欢的任何内容,如果要忽略它,可以肯定吗?
The whole point of a function is to return something. If it returns nothing, why do you want to call it ? You can return whatever you like, if you''re going to ignore it, surely ?


没有创建函数的选项,没有返回值.只是想想通过在另一个查询中调用void UDF将实现什么.

考虑一下SQL Server&中的CTE(公用表表达式).用CTE替换UDF
There is no option to create a Function, without return values. Just think what you will achieve by calling void UDF in another query.

Think about CTE (Common Table expression) in SQL server & replace the UDF with a CTE


这篇关于ms sql中没有返回类型的函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆