我的主要技能是使用SQL Server,但是有人要求我对Oracle查询进行一些调优。我编写了以下SQL:
declare @startDate int
select @startDate = 20110501
我得到这个错误:
declare @startDate int
select @startDate = 20110501
Error at line 1
ORA-06550: line 1, column 9:
PLS-00103: Encountered the symbol "@" when expecting one of the following:
begin function package pragma procedure subtype type use
<an identifier> <a double-quoted delimited-identifier> form
current cursor
如何在Oracle中声明和使用变量?