HeatWave
Use automated and integrated generative AI and machine learning (ML) in one cloud service for
transactions and lakehouse scale analytics. Get faster insights from all your data with unmatched
performance and deploy apps in your choice of cloud providers.
Learn More »
MySQL Enterprise Edition
The most comprehensive set of advanced features, management tools and technical support to
achieve the highest levels of MySQL scalability, security, reliability, and uptime.
Learn More »
MySQL for OEM/ISV
Over 2000 ISVs, OEMs, and VARs rely on MySQL as their products' embedded database to make their
applications, hardware and appliances more competitive, bring them to market faster, and lower
their cost of goods sold.
Learn More »
MySQL Cluster CGE
MySQL Cluster enables users to meet the database challenges of next generation web, cloud, and
communications services with uncompromising scalability, uptime and agility.
Learn More »
Free Webinars
What’s New in MySQL Monitoring with Oracle Enterprise Manager Plugin
Thursday, April 03, 2025
Smooth Migration from Microsoft SQL Server to MySQL Using GenAI Services
On-Demand
Fine-Tuning MySQL for Your Business Needs and Growth
On-Demand
More »
White Papers
MySQL Enterprise Edition for Government
MySQL Enterprise Edition for Financial Services
Migrate from MariaDB to MySQL
Introduction to MySQL and Healthcare
HeatWave AutoML - In Database Machine Learning
More »
Powered by MySQL
Contact MySQL Sales
USA/Canada: +1-866-221-0634 (More Countries »)
Products
HeatWave
MySQL Enterprise Edition
MySQL Standard Edition
MySQL Classic Edition
MySQL Cluster CGE
MySQL Embedded (OEM/ISV)
Services
Training
Certification
Support
Downloads
MySQL Community Server
MySQL NDB Cluster
MySQL Shell
MySQL Router
MySQL Workbench
Documentation
MySQL Reference Manual
MySQL Workbench
MySQL NDB Cluster
MySQL Connectors
Topic Guides
About MySQL
Contact Us
Blogs
How to Buy
Partners
Job Opportunities
Site Map
English ( Deutsch | Français | Italiano | 日本 | 中文 )
© 2025 Oracle
MySQL SQL
❮ PreviousNext ❯
What is SQL?
SQL is the standard language for dealing with Relational Databases.
SQL is used to insert, search, update, and delete database records.
How to Use SQL
The following SQL statement selects all the records in the "Customers" table:
Example
SELECT * FROM Customers;
Try it Yourself »
Keep in Mind That...
SQL keywords are NOT case sensitive: select is the same as SELECT
In this tutorial we will write all SQL keywords in upper-case.
Semicolon after SQL Statements?
Some database systems require a semicolon at the end of each SQL statement.
Semicolon is the standard way to separate each SQL statement in database systems that allow more
than one SQL statement to be executed in the same call to the server.
In this tutorial, we will use semicolon at the end of each SQL statement.
Some of The Most Important SQL Commands
SELECT - extracts data from a database
UPDATE - updates data in a database
DELETE - deletes data from a database
INSERT INTO - inserts new data into a database
CREATE DATABASE - creates a new database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index (search key)
DROP INDEX - deletes an index