SQL
|
PL/SQL
|
Used
to access data within Oracle database
|
Used
to access data within oracle databases
|
Not
include all normal programming language features.
|
Includes
all normal programing language features, e.g. loops, IF…THEN…ELSE statements
|
Tells
the database what to do (declarative)
|
Tells
the database how to do things (procedural)
|
Is
used to code queries, DML and DDL statements
|
Used
to code program blocks, triggers, functions, procedures and packages
|
Is
executed one statement at a time
|
Executed
as a block of codes
|
Can
be embedded in a PL/SQL program
|
Can’t
be embedded in a SQL statement
|
PL/SQL
has the ability to easily integrate with SQL
Eg 1: SET SERVEROUTPUT ON SIZE 4000; DECLARE todays_date DATE; BEGIN todays_date := SYSDATE; DBMS_OUTPUT.PUT_LINE('Today''s date is ' || todays_date); END; Eg 2: SET SERVEROUTPUT ON SIZE 4000; DECLARE todays_date DATE; BEGIN todays_date := SYSDATE; DBMS_OUTPUT.PUT_LINE('Today''s date is ' || TO_CHAR(todays_date, 'Month DD, YYYY')); END |
Saturday, November 25, 2017
SQL vs PL/SQL
Subscribe to:
Post Comments (Atom)
GEN AI
Stay Tuned....
-
Common BI queries Relational queries Vs OLAP queries Before moving to terms used in Data warehouse, let us see the architect...
-
From yesterday onwards, I am stuck up with an error while trying to deploy cube. " You cannot deploy the model because the localhost ...
-
CRM Involves managing all aspects of a customer’s relationship with an organization to increase customer loyalty and retention and an organ...
No comments:
Post a Comment