Hibernate / SQL
Different subsets of SQL.
SQL queries can be categories into 4 main Categories:
DDL (Data Definition Language).
As the name suggests, these types of queries are used to define the structure of data. Like the structure of a table, schema and modify it. Example,
- CREATE: This command is used to create tables, database, schema etc.
- DROP: This command is used to drop tables and other database objects.
- ALTER: This command is used to alter the definition of database objects.
- TRUNCATE: This command is used to remove tables, procedures, views, and other database objects.
- ADD COLUMN: This command is used to add any column to the table schema.
- DROP COLUMN: This command is used to drop a column from any table structure.
DML (Data Manipulation Language)
This type of queries is used to manipulate data in the database. Example,
- SELECT INTO: This command is used to select data from one table and insert it into another table.
- INSERT: This command is used to insert data/records into a table.
- DELETE: This command is used to delete records from the table.
- UPDATE: This command is used to update the value of any record in the database.
DCL (Data Control Language)
This category of SQL queries deals with the access rights and permission control of the database. Example,
- GRANT: This command is used to grant access rights to database objects.
- REVOKE: This command is used to withdraw permission from database objects.
TCL (Transaction Control Language)
The transaction is a set of commands that perform a specific task on objects in a single unit of execution. So TCL commands deals with transactions in a database. Example,
- COMMIT: This command is used to commit a transaction. Once committed, it cannot be rolled back. This means the previous image of the database before running this transaction cannot be retrieved.
- ROLLBACK: Rollback is used to revert the steps in transactions if an error occurs. SAVEPOINT: This command sets a savepoint in the transaction to which steps can be rolled back.
- SET TRANSACTION: This command is used to set the characteristics of the transaction.
Dogecoin
! Earn free bitcoins up to $250 now by signing up.
Earn bitcoins upto $250 (free), invest in other Cryptocurrencies when you signup with blockfi.
Use the referral link: Signup now and earn!

Using BlockFi, don't just buy crypto - start earning on it. Open an interest account with up to 8.6% APY, trade currencies, or borrow money without selling your assets.

Join CoinBase
! We'll both receive $10 in free Bitcoin when they buy or sell their first $100 on Coinbase! Available in India also.
Use the referral Join coinbase!

Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.

Webull
! Receive free stock by signing up using the link: Webull signup.
More Related questions...