SQL Server中Oracle的DEFINE语句的等效语句是什么?

时间:2013-10-22 04:01:21

标签: sql-server

我想在SQL Server中声明Oracle的以下声明:

DEFINE SYNTEMPO_USER_NAME=&SYNTEMPO_USER_NAME

谢谢,

1 个答案:

答案 0 :(得分:0)

Declare @myVar varchar(100); -- or nvarchar, etc.
Set @myVar = 'literal';

Select @myVar = mycolumn
   from mytable
     where mytable.tableid = 1;