Structure Query Language

What is SQL ?

SQL (Structured Query Language) is a programming language used to communicate with databases. It is used to store, retrieve, manipulate, and manage data in relational databases. SQL uses statements to perform tasks such as updating data …


This content originally appeared on DEV Community and was authored by Muhammad Rameez

What is SQL ?

SQL (Structured Query Language) is a programming language used to communicate with databases. It is used to store, retrieve, manipulate, and manage data in relational databases. SQL uses statements to perform tasks such as updating data in a database or retrieving data from a database. We can delete, alter and fetch the data by using query of SQL within a second. SQL is not a Case sensitive language which means you can write query in all caps or in all small, it will works. SQL can create stored procedures and views in a database.

For Example :
Select * from life where memory like 'Joy'
Select * from Bytewise where fellow like 'Data Engineer'

There are 3 types of SQL :

  • DDL
  • DML
  • DQL

What is DDL ?

DDL (Data Definition Language) is a type of SQL language used to define the structure of a database. It is used to create, modify, and delete database objects such as tables, views, and other database structures. DDL statements are also used to set permissions on database objects and to create and alter stored procedures and functions.

What is DML ?

DML (Data Manipulation Language) is a type of SQL language used to manipulate data. It is used to insert, update, delete, and select data in a database. DML statements are also used to control access to the data stored in a database.

What is DQL ?

DQL (Data Query Language) is a type of SQL language used to query data from a database. It is used to retrieve data from one or more tables, views, or other sources in a database. DQL statements are also used to specify conditions in the query, such as selecting data based on certain criteria.

Famous SQL Commands :

  • Create Database :
    CREATE DATABASE <database_name>;

  • Alter a Database :
    ALTER DATABASE <database_name> [MODIFY]<newName_database>;

  • Deleting a Database :
    DROP DATABASE <database_name>;
    TRUNCATE DATABASE <database_name>;
    DELETE DATABASE <database_name>;

Data Types used in SQL :

Data Types in SQL are used to define the type of data stored in the columns of a database table. The most common SQL data types are:

INTEGER, VARCHAR, BOOLEAN, DATE, TIME, and DECIMAL.

Each data type has a specific set of properties and characteristics that define how it is stored and used.

For example, INTEGER is used to store whole numbers, VARCHAR is used to store variable-length strings, BOOLEAN is used to store true or false values, and DATE is used to store date and time values. Other data types, such as DECIMAL, can be used to store more complex data types such as currency values.


This content originally appeared on DEV Community and was authored by Muhammad Rameez


Print Share Comment Cite Upload Translate Updates
APA

Muhammad Rameez | Sciencx (2023-03-25T20:08:45+00:00) Structure Query Language. Retrieved from https://www.scien.cx/2023/03/25/structure-query-language/

MLA
" » Structure Query Language." Muhammad Rameez | Sciencx - Saturday March 25, 2023, https://www.scien.cx/2023/03/25/structure-query-language/
HARVARD
Muhammad Rameez | Sciencx Saturday March 25, 2023 » Structure Query Language., viewed ,<https://www.scien.cx/2023/03/25/structure-query-language/>
VANCOUVER
Muhammad Rameez | Sciencx - » Structure Query Language. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2023/03/25/structure-query-language/
CHICAGO
" » Structure Query Language." Muhammad Rameez | Sciencx - Accessed . https://www.scien.cx/2023/03/25/structure-query-language/
IEEE
" » Structure Query Language." Muhammad Rameez | Sciencx [Online]. Available: https://www.scien.cx/2023/03/25/structure-query-language/. [Accessed: ]
rf:citation
» Structure Query Language | Muhammad Rameez | Sciencx | https://www.scien.cx/2023/03/25/structure-query-language/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.