In Oracle, we can write anonymous blocks for quick testing of logic without having to store the object on the database.
在Oracle中,我们可以编写匿名块来快速测试逻辑,而不必将对象存储在数据库中。
Does SQL Server support anonymous blocks? I tried google, but it mostly returns links for oracle.
SQL Server是否支持匿名块?我尝试了谷歌,但它主要返回oracle的链接。
Thanks.
谢谢。
1 个解决方案
#1
5
You use SSMS to test any "block" of T-SQL without creating any sort of object (stored procedure or function). Just declare your variables, if you need any, and wirte your code.
使用SSMS测试T-SQL的任何“块”,而不创建任何类型的对象(存储过程或函数)。只要声明您的变量(如果需要的话),然后修改代码。
#1
5
You use SSMS to test any "block" of T-SQL without creating any sort of object (stored procedure or function). Just declare your variables, if you need any, and wirte your code.
使用SSMS测试T-SQL的任何“块”,而不创建任何类型的对象(存储过程或函数)。只要声明您的变量(如果需要的话),然后修改代码。