Urgent.News

What's breaking now, across thousands of outlets.

Tech

Oracle SQL: SQL Statement Classifications

1. SQL Statement Classifications SQL statements are categorized based on their functional purpose within the database architecture: Data Manipulation Language (DML): Retrieves data from the database, enters new rows, changes existing rows, and removes unwanted rows from tables in the database. Commands: SELECT , INSERT , UPDATE , DELETE , MERGE NOTE: While SELECT is frequently categorized under…

SQL statements are classified into four main categories based on their purpose within the database architecture: Data Manipulation Language (DML), Data Definition Language (DDL), Data Control Language (DCL), and Transaction Control Language (TCL).

DML statements, such as SELECT, INSERT, UPDATE, DELETE, and MERGE, are used to retrieve data, add new rows, modify existing rows, and delete rows from tables in the database. These statements are often categorized under Data Query Language (DQL) in training materials, although they are formally classified as DML.

DDL statements, including CREATE, ALTER, DROP, RENAME, TRUNCATE, and COMMENT, are responsible for setting up changes and removing data structures from tables and the database dictionary. Notably, DDL statements automatically issue an implicit COMMIT before and after execution, and cannot be rolled back.

DCL statements, which are GRANT and REVOKE, manage access rights to both the Oracle database and the structures within it. Lastly, TCL statements, namely COMMIT, ROLLBACK, and SAVEPOINT, are used to manage the changes made by DML statements. These changes can be grouped together into logical transactions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Oracle SQL: Essential Environment Commands

SET DEFINE OFF Purpose: Controls whether SQL*Plus and SQL Developer interpret the ampersand ( & ) as a substitution variable prefix or as a literal character.

  • SET DEFINE OFF controls ampersand usage in SQLPlus and SQL Developer
  • SET LINESIZE determines max characters per line before wrapping
  • SHOW ALL retrieves current environment setup and configuration statuses

More from Sunday 27 September →