SQL Exercises
Exercises
Test your SQL skills with exercises from all categories:
Syntax
Select
Select Distinct
Where
Order By
And
Or
Not
Insert Into
Null Values
Update
Delete
Select Top
Min and Max
Count
Sum
Avg
Like
Wildcards
In
Between
Aliases
Joins
Inner Join
Left Join
Right Join
Full Join
Self Join
Union
Group By
Having
Exists
Any, All
Select Into
Insert Into Select
CASE Expression
NULL Functions
Stored Procedures
Comments
Operators
Create Database
Drop Database
Backup Database
Create Table
Drop Table
Alter Table
Constraints
Not Null
Unique
Primary Key
Foreign Key
Check
Default
Create Index
Auto Increment
Dates
View
Injection
Hosting
Data Types
Log in to track your progress
If you haven't already, sign up to become a W3Schooler, and get points for every exercise you complete.
As a logged on W3Schools user you will have access to many features like having your own web page, track your learning progress, receive personal guided paths, and more.
The Exercise
The exercises are a mix of "multiple choice" and "fill in the blanks" questions. There are between 3 and 9 questions in each catergory. The answer can be found in the corresponding tutorial chapter. If you're stuck, or answer wrong, you can try again or hit the "Show Answer" button to see the correct answer.