I would like to declare and display a variable in Oracle.
In T-SQL I would do something like this
DECLARE @A VARCHAR(10) --Declares @A SELECT @A = \'
Make sure that, server output is on otherwise output will not be display;
sql> set serveroutput on;
declare n number(10):=1; begin while n<=10 loop dbms_output.put_line(n); n:=n+1; end loop; end; /
Outout: 1 2 3 4 5 6 7 8 9 10