DEV Community

Cover image for PostgreSQL topics
Keerthana M
Keerthana M

Posted on

PostgreSQL topics

Difference between Store procedure and function in PostgreSQL

. DDL - Data Definition Language

  • DDL (Data Definition Language) consists of SQL commands.
  • It can be used for defining, altering and deleting database structures such as tables, indexes and schemas.

DQL - Data Query Language

  • DQL is used to fetch data from the database.
  • The main command is SELECT, which retrieves records based on the query. The output is returned as a result set (a temporary table) that can be viewed or used in applications.

DML - Data Manipulation Language

  • DML commands are used to manipulate the data stored in database tables.
  • We can insert new records, update existing ones, delete unwanted data or retrieve information.

DCL - Data Control Language

  • DCL (Data Control Language) includes commands such as GRANT and REVOKE which mainly deal with the rights, permissions and other controls of the database system.

  • These commands are used to control access to data in the database by granting or revoking permissions.

Difference between tables and views

Difference between delete and drop and truncate

Difference between unique and primary key and foreign key and composite key

Ref:

embed https://www.geeksforgeeks.org/

Top comments (0)