我在朋友的.sql脚本中看到了以下sql:
Traceback (most recent call last):
File "<stdin>", line 14, in <module>
globals().somevalue = True # Error.
AttributeError: 'dict' object has no attribute 'somevalue'
Traceback (most recent call last):
File "<stdin>", line 14, in <module>
self.__module__.globals().somevalue = True # Error.
AttributeError: 'str' object has no attribute 'globals'
Traceback (most recent call last):
File "<stdin>", line 14, in change_global_value
somevalue = True # Error as well.
UnboundLocalError: local variable 'somevalue' referenced before assignment
我的朋友说from (
.....
) a
select col1,col2 from a
select col3 from a where ...
中的sql只会被执行一次,并且在调用'from'
时会重复使用它的结果。
我只想确认这是真的吗?如果是这样,RMDB如何存储其结果以及何时将结果发布?