Code has been added to clipboard!

SQL Basics: Writing a Simple Query

Reading time 1 min
Published Jan 1, 2016
Updated Oct 3, 2019

SQL Basics: Main Tips

  • SQL is used for reading, writing and modifying data in a database.
  • It's a standard tool for a variety of databases: MySQL, MS Access, SQL Server, Sybase, Oracle, Postgres, etc.
  • To practice on your SQL basics, you will need to create your test database or use an online editor for queries.

SQL Simple Query Syntax

Example
SELECT * FROM Customers;

Note: if you feel that this is easy, you can skip to a more advanced SQL tutorial like SQL Data Types.

SQL Basics: Summary

  • Use SQL for reading, writing and modifying data in a database.
  • SQL works on various types of databases: MySQL, MS Access, SQL Server, Sybase, Oracle, Postgres, and others.
  • To practice writing SQL queries, you need to create a database or use an online editor.
Learn SQL
Introduction
Syntax
Data Types
Server Data Types
Commands
Commands List
Wildcards
Constraints
Aggregate Functions
Date Functions
Date Format
Injection
SQL Server Hosting
Views
Auto-incrementation
SQL Operators
AS
AND & OR
IN
BETWEEN
WHERE
GROUP BY
HAVING
ORDER BY
LIKE
NOT
NOT EQUAL
UNION
NULL
NOT NULL
DEFAULT
UNIQUE
FOREIGN KEY
PRIMARY KEY
CHECK
Indexes
ALTER TABLE
CREATE DATABASE
CREATE TABLE
DELETE
DROP
INSERT INTO SELECT
INSERT INTO
SELECT
SELECT DISTINCT
SELECT INTO
SELECT TOP
UPDATE
FULL OUTER JOIN
INNER JOIN
JOIN
LEFT JOIN
RIGHT JOIN
AVG()
COUNT
FIRST
LAST
MAX
MIN()
SUM()
LEN
UCASE
MID
NOW
ROUND
FORMAT
LOWER
CONVERT
ISNULL