Mobirise

SQL | Introduction

SQL tutorial provides basic and advanced concepts of SQL. Our SQL tutorial is designed for beginners and professionals.

SQL (Structured Query Language) is used to perform operations on the records stored in the database such as updating records, deleting records, creating and modifying tables, views, etc.

SQL is just a query language; it is not a database. To perform SQL queries, you need to install any database, for example, Oracle, MySQL, MongoDB, PostGre SQL, SQL Server, DB2, etc.

What is SQL

SQL stands for Structured Query Language.
It is designed for managing data in a relational database management system (RDBMS).
It is pronounced as S-Q-L or sometime See-Qwell.
SQL is a database language, it is used for database creation, deletion, fetching rows, and modifying rows, etc.
SQL is based on relational algebra and tuple relational calculus.
All DBMS like MySQL, Oracle, MS Access, Sybase, Informix, PostgreSQL, and SQL Server use SQL as standard database language.

SQL Example with SQL Editor

With our online SQL editor, you can edit the SQL statements, and click on a button to view the result.

Example

To select all columns from a table (Customers) for rows where the Last_Name column has Smith for its value, you would send this SELECT statement to the server back end:

SELECT * FROM Customers WHERE Last_Name='Smith';

The server back end would reply with a result set similar to this:

+---------+-----------+------------+
| Cust_No | Last_Name | First_Name |
+---------+-----------+------------+
| 1001 | Smith | John |
| 2039 | Smith | David |
| 2098 | Smith | Matthew |
+---------+-----------+------------+

3 rows in set (0.05 sec)

1

Applications of SQL


As mentioned before, SQL is one of the most widely used query language over the databases. I'm going to list few of them here:

Allows users to access data in the relational database management systems.

Allows users to describe the data.

Allows users to define the data in a database and manipulate that data.

Allows to embed within other languages using SQL modules, libraries & pre-compilers.

Allows users to create and drop databases and tables.

Allows users to create view, stored procedure, functions in a database.

Allows users to set permissions on tables, procedures and views

2

Why SQL is required

To create new databases, tables and views
To insert records in a database
To update records in a database
To delete records from a database
To retrieve data from a database

3

What Can SQL do?

SQL can execute queries against a database
SQL can retrieve data from a database
SQL can insert records in a database
SQL can update records in a database
SQL can delete records from a database
SQL can create new databases
SQL can create new tables in a database
SQL can create stored procedures in a database
SQL can create views in a database
SQL can set permissions on tables, procedures, and views 

Created with Mobirise - Check it