Movatterモバイル変換


[0]ホーム

URL:


Menu
×
See More 
Sign In
+1 Get Certified Upgrade For Teachers Spaces Get Certified Upgrade For Teachers Spaces
   ❮     
     ❯   

SQL Tutorial

SQL HOMESQL IntroSQL SyntaxSQL SelectSQL Select DistinctSQL WhereSQL Order BySQL AndSQL OrSQL NotSQL Insert IntoSQL Null ValuesSQL UpdateSQL DeleteSQL Select TopSQL Aggregate FunctionsSQL Min and MaxSQL CountSQL SumSQL AvgSQL LikeSQL WildcardsSQL InSQL BetweenSQL AliasesSQL JoinsSQL Inner JoinSQL Left JoinSQL Right JoinSQL Full JoinSQL Self JoinSQL UnionSQL Union AllSQL Group BySQL HavingSQL ExistsSQL Any, AllSQL Select IntoSQL Insert Into SelectSQL CaseSQL Null FunctionsSQL Stored ProceduresSQL CommentsSQL Operators

SQL Database

SQL Create DBSQL Drop DBSQL Backup DBSQL Create TableSQL Drop TableSQL Alter TableSQL ConstraintsSQL Not NullSQL UniqueSQL Primary KeySQL Foreign KeySQL CheckSQL DefaultSQL IndexSQL Auto IncrementSQL DatesSQL ViewsSQL InjectionSQL HostingSQL Data Types

SQL References

SQL KeywordsMySQL Functions
String Functions:ASCIICHAR_LENGTHCHARACTER_LENGTHCONCATCONCAT_WSFIELDFIND_IN_SETFORMATINSERTINSTRLCASELEFTLENGTHLOCATELOWERLPADLTRIMMIDPOSITIONREPEATREPLACEREVERSERIGHTRPADRTRIMSPACESTRCMPSUBSTRSUBSTRINGSUBSTRING_INDEXTRIMUCASEUPPERNumeric Functions:ABSACOSASINATANATAN2AVGCEILCEILINGCOSCOTCOUNTDEGREESDIVEXPFLOORGREATESTLEASTLNLOGLOG10LOG2MAXMINMODPIPOWPOWERRADIANSRANDROUNDSIGNSINSQRTSUMTANTRUNCATEDate Functions:ADDDATEADDTIMECURDATECURRENT_DATECURRENT_TIMECURRENT_TIMESTAMPCURTIMEDATEDATEDIFFDATE_ADDDATE_FORMATDATE_SUBDAYDAYNAMEDAYOFMONTHDAYOFWEEKDAYOFYEAREXTRACTFROM_DAYSHOURLAST_DAYLOCALTIMELOCALTIMESTAMPMAKEDATEMAKETIMEMICROSECONDMINUTEMONTHMONTHNAMENOWPERIOD_ADDPERIOD_DIFFQUARTERSECONDSEC_TO_TIMESTR_TO_DATESUBDATESUBTIMESYSDATETIMETIME_FORMATTIME_TO_SECTIMEDIFFTIMESTAMPTO_DAYSWEEKWEEKDAYWEEKOFYEARYEARYEARWEEKAdvanced Functions:BINBINARYCASECASTCOALESCECONNECTION_IDCONVCONVERTCURRENT_USERDATABASEIFIFNULLISNULLLAST_INSERT_IDNULLIFSESSION_USERSYSTEM_USERUSERVERSION
SQL Server FunctionsMS Access FunctionsSQL Quick Ref

SQL Examples

SQL ExamplesSQL EditorSQL QuizSQL ExercisesSQL ServerSQL SyllabusSQL Study PlanSQL BootcampSQL CertificateSQL Training

SQLExercises


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 havingyour own web page,track your learning progress,receive personal guided paths, andmore.


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 completingthe course

Get certifiedw3schoolsCERTIFIED.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

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 ourterms of use,cookie and privacy policy.

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


[8]ページ先頭

©2009-2025 Movatter.jp