# data[].attributes.attachment_link.title
Wayground — The world’s most engaging learning platform

# data[].attributes.attachment_link.description
Find and create gamified quizzes, lessons, presentations, and flashcards for students, employees, and everyone else. Get started for free!

# data[].attributes.attachment_link.description
Join an activity with your class and find or create your own quizzes and flashcards.

# data[].attributes.attachment_link.title
Wayground — The world’s most engaging learning platform

# data[].attributes.attachment_link.description
Find and create gamified quizzes, lessons, presentations, and flashcards for students, employees, and everyone else. Get started for free!

# data[].attributes.attachment_link.title
Wayground — The world’s most engaging learning platform

# data[].attributes.attachment_link.description
Find and create gamified quizzes, lessons, presentations, and flashcards for students, employees, and everyone else. Get started for free!

# data[].attributes.attachment_link.title
Input Masks Lookups and Validation Rules

# data[].attributes.attachment_link.description
Join an activity with your class and find or create your own quizzes and flashcards.

# data[].attributes.attachment_link.title
What is SQL? [in 4 minutes for beginners]

# data[].attributes.attachment_link.readable_text
SQL is a standard language for storing, manipulating and retrieving data in databases.

Our SQL tutorial will teach you how to use SQL in: MySQL, SQL Server, MS Access, Oracle, Sybase, Informix, Postgres, and other database systems.

Start learning SQL now "

Examples in Each Chapter

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

Click on the "Try it Yourself" button to see how it works.

SQL Exercises

SQL Examples

Learn by examples! This tutorial supplements all explanations with clarifying examples.
See All SQL Examples
SQL Quiz Test

Test your SQL skills at W3Schools!
Start SQL Quiz!
My Learning

Track your progress with the free "My Learning" program here at W3Schools.

Log in to your account, and start earning points!

This is an optional feature. You can study at W3Schools without using My Learning.

SQL References

At W3Schools you will find a complete reference for keywords and function:
SQL Keyword Reference MYSQL Functions SQLServer Functions MS Access Functions SQL Quick Reference
SQL Data Types

Data types and ranges for Microsoft Access, MySQL and SQL Server.
SQL Data Types
Kickstart your career

Get certified by completing the course

# data[].attributes.attachment_link.description
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

# data[].attributes.attachment_link.readable_text
SQL Tutorial

SQL (Structured Query Language) is a programming language which is used to manage data stored in relational databases like MySQL, MS Access, SQL Server, Oracle, Sybase, Informix, Postgres etc.

Our SQL tutorial helps you learn SQL (Structured Query Language) in simple and easy steps so that you can start your database programming quickly. It covers most of the important concepts related to SQL for a basic to advanced understanding of SQL and to get a feel of how SQL works.

SQL is a database computer language designed for the retrieval and management of data in a relational databases like MySQL, MS Access, SQL Server, Oracle, Sybase, Informix, Postgres etc. SQL stands for Structured Query Language. SQL was developed in the 1970s by IBM Computer Scientists.

SQL is not a database management system, but it is a query language which is used to store and retrieve the data from a database or in simple words SQL is a language that communicates with databases.

SQL Examples

Consider we have following CUSTOMERS table which stores customer's ID, Name, Age, Salary, City and Country −

SQL makes it easy to manipulate this data using simple DML (Data Manipulation Language) Statements. For example, if we want to list down all the customers from USA then following will be the SQL query.

SELECT * FROM CUSTOMERS WHERE country = 'USA';

This will produce the following result:

SQL Online Editor

We have provided SQL Online Editor which helps you to Edit and Execute the SQL code directly from your browser. Try to click the icon to run the following SQL code to be executed on CUSTOMERS table and print the records matching with the given condition.

SELECT * FROM CUSTOMERS WHERE country = 'USA';

So now, you do not need to do a sophisticated setup to execute all the examples given in this tutorial because we are providing you Online SQL Editor, which allows you to edit your code and compile it online. You can try our Online SQL Editor.

SQL Basic Commands

We have a list of standard SQL commands to interact with relational databases, These commands are CREATE, SELECT, INSERT, UPDATE, DELETE, DROP and TRUNCATE and can be classified into the following groups based on their nature −

Data Definition Language (DDL)

A Data Definition Language (DDL) is a computer language which is used to create and modify the structure of database objects which include tables, views, schemas, and indexes etc.

Data Manipulation Language (DML)

A Data Manipulation Language (DML) is a computer programming language which is used for adding, deleting, and modifying data in a database.

Data Control Language (DCL)

Data Control Language (DCL) is a computer programming language which is used to control access to data stored in a database.

Why to Learn SQL?

SQL (Structured Query Language) is a MUST for the students and working professionals to become a great Software Engineer specially when they are working in Software Development Domain. SQL is the most common language used almost in every application software including banking, finance, education, security etc. to store and manipulate data.

SQL is fairly easy to learn, so if you are starting to learn any programming language then it is very much advised that you should also learn SQL and other Database related concepts to become a complete Software Programmer. There are many good reasons which makes SQL as the first choice of any programmer −

SQL is the standard language for any Relational Database System. All the Relational Data Base Management Systems (RDBMS) like MySQL, MS Access, Oracle, Sybase, Informix, Postgres and SQL Server use SQL as their standard database language.

Also, software industry is using different dialects of SQL, such as −

SQL Applications

SQL is one of the most widely used Query Language over the databases. SQL provides following functionality to the database programmers −

Execute different database queries against a database.

Define the data in a database and manipulate that data.

Create data in a relational database management system.

Access data from the relational database management system.

Create and drop databases and tables.

Create and maintain database users.

Create view, stored procedure, functions in a database.

Set permissions on tables, procedures and views.

Who Should Learn SQL

This SQL tutorial will help both students as well as working professionals who want to develop applications based on some databases like banking systems, support systems, information systems, web websites, mobile apps or personal blogs etc. We recommend reading this tutorial, in the sequence listed in the left side menu.

Today, SQL is an essential language to learn for anyone involved in the software applicatipon development process including Software Developers, Software Designers, and Project Managers etc.

Prerequisites to Learn SQL

Though we have tried our best to present the SQL concepts in a simple and easy way, still before you start learning SQL concepts given in this tutorial, it is assumed that you are already aware about some basic concepts of computer science, what is a database, especially the basics of RDBMS and associated concepts.

This tutorial will give you enough understanding on the various concepts of SQL along with suitable examples so that you can start your Software Development journey immediately after finishing this tutorial.

SQL Online Quizzes

This SQL tutorial helps you prepare for technical interviews and certification exams. We have provided various quizzes and assignments to check your learning level. Given quizzes have multiple choice type of questions and their answers with short explanation.

Following is a sample quiz, try to attempt any of the given answers:

Start your online quiz Start SQL Quiz.

SQL Jobs and Opportunities

SQL professionals are very much in high demand as the data turn out is increasing exponentially. Almost every major company is recruiting IT professionals having good experience with SQL.

Average annual salary for a SQL professional is around $150,000. Though it can vary depending on the location. Following are the great companies who keep recruiting SQL professionals like Database Administrator (DBA), Database Developer, Database Testers, Data Scientist, ETL Developer, Database Migration Expert, Cloud Database Expert etc:

So, you could be the next potential employee for any of these major companies. We have developed a great learning material for SQL which will help you prepare for the technical interviews and certification exams based on SQL. So, start learning SQL using our simple and effective tutorial anywhere and anytime absolutely at your pace.

Frequently Asked Questions about SQL

There are some very Frequently Asked Questions(FAQ) about SQL, this section tries to answer them briefly.

What are SQL skills?

What are the 5 different types of SQL?

How long should it take to learn SQL?

What are the benefits of using SQL over Excel?

How do I start learning SQL?

What are the 4 basic commands in SQL?

What are data types in SQL?

Which is the best place to learn SQL?

Kickstart Your Career

Get certified by completing the course

Get Started

# data[].attributes.attachment_link.description
SQL Tutorial - SQL (Structured Query Language) is a programming language which is used to manage data stored in relational databases like MySQL, MS Access, SQL Server, Oracle, Sybase, Informix, Postgres etc.

# data[].attributes.attachment_link.title
What is Data Hierarchy? Component of Data Hierarchy

# data[].attributes.attachment_link.title
How to Cite Sources in APA Citation Format | Mendeley

# data[].attributes.attachment_link.description
This is a complete guide to APA (American Psychological Association) in-text and reference list citations. This easy-to-use, comprehensive guide makes citing any source easy. Check out our other citation guides on MLA 8 and Harvard referencing.

# data[].attributes.attachment_link.title
Adding Citations & References Using MS Word

# data[].attributes.attachment_link.title
How to paraphrase to avoid plagiarism I paraphrasing techniques

# data[].attributes.attachment_link.title
Programs, Data and Databases (Bits and Bytes, Episode 4)

# data[].attributes.attachment_link.title
Conceptual Model - Database Design - Class 4

# data[].attributes.attachment_link.description
Learn SQL tutorial for beginners and professionals with sql, tutorial, examples, insert, update, delete, select, join, database, table, join

# data[].attributes.attachment_link.title
Conceptual Model - Database Design - Class 4