【发布时间】:2014-07-08 19:02:33
【问题描述】:
我必须在查询结果中插入一个假列,它是表值函数的返回值。此列数据类型必须是唯一标识符。最好的方法(我认为......)是使用newid() 函数。问题是,我不能在这种类型的函数中使用newid():
Invalid use of side-effecting or time-dependent operator in 'newid()' within a function.
【问题讨论】:
-
函数不允许包含非确定性运算符。你能发布你的函数定义吗?
标签: sql-server function newid