Are the stored procedures DDL or DML?

Where DDL and DML are mainly:

  • DDL = data definition language
  • DML = data manipulation language

I have always classified stored procedures as DDL because I use structured query language .

But lately, I discussed that stored procedures must be DML or belong to a different classification, because they internally have DDL and DML.

I searched on the Internet and I did not find reliable documentation in which stored procedures are classified as DDL, then I could not argue anymore ...

So the question is simple: Are DDL stored procedures? or DML?

+4
source share
1

DML DDL , DDL :

(DDL)   . :

 1. CREATE:   To create objects in the database
 2. ALTER:    Alters the structure of the database 
 3. DROP:     Delete objects from the database
 4. TRUNCATE: Remove all records from a table, including all spaces allocated for the records are removed
 5. COMMENT:  Add comments to the data dictionary
 6. RENAME:   Rename an object

(DML) . :

 1. SELECT:       Retrieve data from the a database 
 2. INSERT:       Insert data into a table UPDATE - updates existing data within a table
 3. DELETE:       Deletes all records from a table, the space for the records remain
 4. CALL:         Call a PL/SQL or Java subprogram    
 5. EXPLAIN PLAN: Explain access path to data 
 6. LOCK TABLE:   Control concurrency
+3

Source: https://habr.com/ru/post/1671083/


All Articles