0 votes
1 view
in SQL by (22.4k points)

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

DECLARE @EmpIDVar INT

SET @EmpIDVar = 1234

SELECT *

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.3k points)

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 SQL Course.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...