ทักษะหลักของฉันอยู่กับ 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 ได้อย่างไร