Multiple choice technology databases

Which of the following are the differences between SQL and PL/SQL?

  1. SQL is executed one statement at a time. PL/SQL is executed as a block of code.

  2. SQL tells the database what to do (declarative), not how to do it. In contrast, PL/SQL tell the database how to do things (procedural).

  3. SQL is used to code queries, DML and DDL statements. PL/SQL is used to code program blocks, triggers, functions, procedures and packages.

  4. You can embed SQL in a PL/SQL program, but you cannot embed PL/SQL within a SQL statement.

Reveal answer Fill a bubble to check yourself
A,B,C,D Correct answer
Explanation

All four statements correctly identify key differences between SQL and PL/SQL. SQL is declarative and statement-based, while PL/SQL is procedural and block-based. SQL handles queries and data definition, while PL/SQL handles program logic structures. The embedding relationship is one-directional: SQL can be embedded within PL/SQL, but not vice versa. These distinctions are fundamental for Oracle developers.