SQL CHEAT SHEET (5 Minutes Read of Structured Query Language (SQL))
SQL (Structured Query Language) is a standardised programming language used to manage relational databases and execute various operations on related data. SQL, which was developed in the 1970s, is now widely used not only by database administrators but also by developers building data integration scripts and data analysts wanting to set up and perform analytical queries.
SQL is used to modify database table and index structures, add, update, and delete rows of data, and retrieve subsets of information from inside a database for transaction processing and analytics applications. Queries and other SQL operations take the form of statements, which are regularly used instructions. Select, add, insert, update, delete, create, change, and truncate are all SQL statements.
In this blog, we will learn how to perform basic operations in SQL. Get function for inserting data, update data, deleting data, grouping data, order data, etc. If you have started using SQL this is the best reference guide.
SQL Facts
SQL stands for Structured Query Language.
SQL is pronounced "sequel".
SQL is a declarative language.
SQL is used to access & manipulate data in databases.
Top SQL DBs are MS SQL Server, Oracle, DB2, and MYSQL.
Database Definitions
RDBMS (Relational Database Management System) - Software that stores and manipulates data arranged in relational database tables.
Table - A set of data arranged in columns and rows. The columns represent characteristics of stored data and the rows represent actual data entries.
How to select data from a table
SELECT <Column List>
FROM <Table Name>
WHERE <Search Condition>
Example: SELECT FirstName, LastName, OrderDate
FROM Orders WHERE OrderDate > '15/12/2020
- SELECT - Retrieve data from table(s)
- INSERT - Insert data into db table
- UPDATE - Update data in db table
- DELETE - Delete data from table
- CREATE - Create db object (table, view, etc.)
- ALTER - Modify db object (table, view, etc.)
- DROP - Delete db object (table, view, etc.)
- GRANT - Assign privilege
- REVOKE - remove privilege
Comments
Post a Comment