如果没有 SET FMTONLY OFF,则无法执行带有 temp table 的查询
Query with temp table can't execute without SET FMTONLY OFF
SQL 默认将 FMTOnly 设置为关闭,我发现快速报告不遵守默认设置,所以我在程序中手动将其关闭,现在我想了解
为什么当 FMTOnly 为 o 时,带有临时表的存储过程不起作用。
有人可以解释一下吗?谢谢
消息 208,级别 16,状态 0,过程 SP_Fast_Obter_Relatorio,
第 54 行无效的对象名称“#Temp”。
Query and result when FMTOnly is
Query and result when FMTOnly is OFF
根据手册:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-fmtonly-transact-sql
FMTONLY ON
仅 returns 元数据到客户端。不是结果行或临时信息。
Returns only metadata to the client. Can be used to test the format of the response without actually running the query.
The setting causes the statement to return the column information only; no rows of data are returned.
SQL 默认将 FMTOnly 设置为关闭,我发现快速报告不遵守默认设置,所以我在程序中手动将其关闭,现在我想了解 为什么当 FMTOnly 为 o 时,带有临时表的存储过程不起作用。 有人可以解释一下吗?谢谢
消息 208,级别 16,状态 0,过程 SP_Fast_Obter_Relatorio, 第 54 行无效的对象名称“#Temp”。
Query and result when FMTOnly is
Query and result when FMTOnly is OFF
根据手册:https://docs.microsoft.com/en-us/sql/t-sql/statements/set-fmtonly-transact-sql
FMTONLY ON
仅 returns 元数据到客户端。不是结果行或临时信息。
Returns only metadata to the client. Can be used to test the format of the response without actually running the query.
The setting causes the statement to return the column information only; no rows of data are returned.