0% found this document useful (0 votes)
27 views2 pages

PL SQL

Uploaded by

Raj Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views2 pages

PL SQL

Uploaded by

Raj Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

PL/SQL

SQL> set serveroutput on


SQL> begin
2 dbms_output.put_line('Hello Everyone');
3 end;
4 /
Hello Everyone
SQL> declare
2 v_name varchar(20);
3 begin
4 v_name:='&Name';
5 dbms_output.put_line('Hello ' ||v_name);
6 end;
7 /
Enter value for name: Nit
old 4: v_name:='&Name';
new 4: v_name:='Nit';
Hello Nit

SQL> declare
2 v_name varchar(20);
3 v_salary number(7);
4 begin
5 v_name:='&Name';
6 select salary into v_salary from employees where last_name = v_name;
7 dbms_output.put_line('Hello ' || v_name || ' is getting ' || v_salary);
8 end;
9 /

You might also like