TYPES OF SQL LANGUAGES
Hi there, data newbie!
I know you are learning about SQL but I think it’s very important you understand how this language is categorized into several types cause they serve different purposes. In this post, I'll explain what they are and why they matter.
SQL allows you to create, modify, query, and control access to these tables and the data they contain.
There are four main types of SQL languages:
Data Definition Language (DDL):
- CREATE TABLE: Creates a new table in the database.
- ALTER TABLE: Modifies an existing table by adding, modifying, or dropping columns.
- CREATE INDEX: Creates an index on a table to improve query performance.
Data Manipulation Language (DML):
- SELECT: Retrieves data from one or more tables in the database.
- INSERT INTO: Inserts new data into a table.
- UPDATE: Modifies existing data in a table.
- DELETE: Deletes data from a table.
Data Control Language (DCL):
Recommended by LinkedIn
- GRANT: Grants permissions to a user or role to perform certain actions on a database object.
- REVOKE: Revokes permissions from a user or role to perform certain actions on a database object.
Transaction Control Language (TCL):
- COMMIT: Saves changes made within a transaction to the database.
- ROLLBACK: Reverses changes made within a transaction and returns the database to its previous state.
There are many great resources available online for learning SQL as a newbie. Here are some web links to get you started:
1. W3Schools SQL Tutorial (https://www.w3schools.com/sql/)
2. SQLBolt (https://sqlbolt.com/)
3. Mode SQL Tutorial (https://mode.com/sql-tutorial/)
4. Khan Academy SQL Course (https://www.khanacademy.org/computing/computer-programming/sql)
5. SQLZoo (https://sqlzoo.net/)
I hope this post was helpful for you. If you want to learn more about SQL, check out some of the resources above.
If you liked this post, please give it a thumbs up and share it with your network. And don't forget to follow me for more tips and tricks on data science and analytics. Thanks for reading!
Happy querying!