[フレーム]

SQL Tutorial

SQL HOME SQL Intro SQL Syntax SQL Select SQL Select Distinct SQL Where SQL Order By SQL And SQL Or SQL Not SQL Insert Into SQL Null Values SQL Update SQL Delete SQL Select Top SQL Aggregate Functions SQL Min and Max SQL Count SQL Sum SQL Avg SQL Like SQL Wildcards SQL In SQL Between SQL Aliases SQL Joins SQL Inner Join SQL Left Join SQL Right Join SQL Full Join SQL Self Join SQL Union SQL Union All SQL Group By SQL Having SQL Exists SQL Any, All SQL Select Into SQL Insert Into Select SQL Case SQL Null Functions SQL Stored Procedures SQL Comments SQL Operators

SQL Database

SQL Create DB SQL Drop DB SQL Backup DB SQL Create Table SQL Drop Table SQL Alter Table SQL Constraints SQL Not Null SQL Unique SQL Primary Key SQL Foreign Key SQL Check SQL Default SQL Index SQL Auto Increment SQL Dates SQL Views SQL Injection SQL Hosting SQL Data Types

SQL References

SQL Keywords MySQL Functions
String Functions: ASCII CHAR_LENGTH CHARACTER_LENGTH CONCAT CONCAT_WS FIELD FIND_IN_SET FORMAT INSERT INSTR LCASE LEFT LENGTH LOCATE LOWER LPAD LTRIM MID POSITION REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPACE STRCMP SUBSTR SUBSTRING SUBSTRING_INDEX TRIM UCASE UPPER Numeric Functions: ABS ACOS ASIN ATAN ATAN2 AVG CEIL CEILING COS COT COUNT DEGREES DIV EXP FLOOR GREATEST LEAST LN LOG LOG10 LOG2 MAX MIN MOD PI POW POWER RADIANS RAND ROUND SIGN SIN SQRT SUM TAN TRUNCATE Date Functions: ADDDATE ADDTIME CURDATE CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP CURTIME DATE DATEDIFF DATE_ADD DATE_FORMAT DATE_SUB DAY DAYNAME DAYOFMONTH DAYOFWEEK DAYOFYEAR EXTRACT FROM_DAYS HOUR LAST_DAY LOCALTIME LOCALTIMESTAMP MAKEDATE MAKETIME MICROSECOND MINUTE MONTH MONTHNAME NOW PERIOD_ADD PERIOD_DIFF QUARTER SECOND SEC_TO_TIME STR_TO_DATE SUBDATE SUBTIME SYSDATE TIME TIME_FORMAT TIME_TO_SEC TIMEDIFF TIMESTAMP TO_DAYS WEEK WEEKDAY WEEKOFYEAR YEAR YEARWEEK Advanced Functions: BIN BINARY CASE CAST COALESCE CONNECTION_ID CONV CONVERT CURRENT_USER DATABASE IF IFNULL ISNULL LAST_INSERT_ID NULLIF SESSION_USER SYSTEM_USER USER VERSION
SQL Server Functions MS Access Functions SQL Quick Ref

SQL Examples

SQL Examples SQL Editor SQL Quiz SQL Exercises SQL Server SQL Syllabus SQL Study Plan SQL Bootcamp SQL Certificate SQL Training

SQL Exercises


Test your SQL skills with exercises from all categories:

Exercises

Tip: Sign in to track your progress - it's free.

0/60 done

Syntax4 exercises

Done

Select5 exercises

Done

Select Distinct5 exercises

Done

Where6 exercises

Done

Order By6 exercises

Done

And5 exercises

Done

Or5 exercises

Done

Not6 exercises

Done

Insert Into4 exercises

Done

Null Values7 exercises

Done

Update6 exercises

Done

Delete6 exercises

Done

Select Top3 exercises

Done

Min and Max5 exercises

Done

Count4 exercises

Done

Sum5 exercises

Done

Avg5 exercises

Done

Like9 exercises

Done

Wildcards8 exercises

Done

In6 exercises

Done

Between8 exercises

Done

Aliases5 exercises

Done

Joins6 exercises

Done

Inner Join5 exercises

Done

Left Join3 exercises

Done

Right Join3 exercises

Done

Full Join3 exercises

Done

Self Join3 exercises

Done

Union4 exercises

Done

Group By5 exercises

Done

Having5 exercises

Done

Exists3 exercises

Done

Any, All5 exercises

Done

Select Into5 exercises

Done

Insert Into Select4 exercises

Done

CASE Expression3 exercises

Done

NULL Functions5 exercises

Done

Stored Procedures6 exercises

Done

Comments7 exercises

Done

Operators7 exercises

Done

Create Database5 exercises

Done

Drop Database6 exercises

Done

Backup Database5 exercises

Done

Create Table5 exercises

Done

Drop Table7 exercises

Done

Alter Table8 exercises

Done

Constraints5 exercises

Done

Not Null5 exercises

Done

Unique5 exercises

Done

Primary Key4 exercises

Done

Foreign Key5 exercises

Done

Check4 exercises

Done

Default4 exercises

Done

Create Index5 exercises

Done

Auto Increment3 exercises

Done

Dates3 exercises

Done

View6 exercises

Done

Injection4 exercises

Done

Hosting3 exercises

Done

Data Types3 exercises

Done

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-in 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 category. 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.


Kickstart your career

Get certified by completing the course

Get certified w3schools CERTIFIED . 2025

×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

FORUM ABOUT ACADEMY
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.

AltStyle によって変換されたページ (->オリジナル) /