Explore Courses Blog Tutorials Interview Questions
0 votes
in SQL by (20.3k points)

Below is an example of using variables in SQL Server 2000.


SET @EmpIDVar = 1234


FROM Employees

WHERE EmployeeID = @EmpIDVar

I want to do the exact same thing in Oracle using SQL Developer without additional complexity. It seems like a very simple thing to do, but I can't find a simple solution. How can I do it?

1 Answer

0 votes
by (40.7k points)
edited by

If you are using the SQL-Developer in Version 3.2 then use the below code:

define value1 = 'sysdate'

SELECT &&value1 from dual;

Note: If you are omitting the "define"-part then you'll be prompted for that value.

If you wish to learn what is SQL then visit this best online SQL course.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories