Advertisement
mali_cox

pl/sql

Jan 23rd, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.45 KB | None | 0 0
  1. DECLARE
  2.  
  3. SupplierName   s.sname%TYPE;  -- %type: go to DB and
  4. SupplierStatus s.status%TYPE; -- find out exact type
  5.  
  6. BEGIN
  7. SELECT sname,status
  8. INTO SupplierName, SupplierStatus
  9. FROM s
  10. WHERE snum = 'S4';
  11.  
  12. DBMS_OUTPUT.put_line('Supplier Name is '||
  13. SupplierName || '; status is '|| SupplierStatus);
  14. -- the || symbol stands for 'concatenate'. Used
  15. -- with strings the way other languages use
  16. -- '+' (javascript) or '&' (VB) or '.' (perl)
  17. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement