0

我知道 sql 不支持 #include 指令,但我找不到不支持的原因。我正在一个项目中工作,我可能需要添加这种支持,以便 sql 文件可以包含另一个。我可能错过了什么明显的事情吗?提前致谢。

问候,裴

4

1 回答 1

0

It is hard to imagine what #include would be used for.

  • Constant definitions?
  • Function definitions?
  • Error messages?

In all the 100+k lines of SQL code I have written, I have never had the urge to include anything else.

The closest I come is to copy and paste and then modify a previously written query or create table. I suppose if there were a macro parametrization scheme, I might devise a way to use includes, but mostly it would not be useful.

于 2012-12-10T19:23:05.033 回答