Вы находитесь на странице: 1из 2

SQL (pronounced “S-Q-L” or “sequel”) allows you to write queries which define

the subset of data you are seeking. Unlike Excel and Sheets, your computer and
SQL will handle how to get the data; you can focus on what data you would like.
You can save these queries, refine them, share them, and run them on different
databases.

SQL, Structured Query Language, is a programming language designed to


manage data stored in relational databases. SQL operates through simple,
declarative statements.

Relational Databases
A database is a set of data stored in a computer. This data is usually structured
into tables. Tables can grow large and have a multitude of columns and records.

A relational database is a database that organizes information into one or more


tables.

A table is a collection of data organized into rows and columns. Tables are
sometimes referred to as relations.

All data stored in a relational database is of a certain data type. Some of the most
common data types are:

 INTEGER, a positive or negative whole number


 TEXT, a text string
 DATE, the date formatted as YYYY-MM-DD for the year, month, and day
 REAL, a decimal value

Statements
The code below is a SQL statement. A statement is text that the database recognizes as a
valid command. Statements always end in a semicolon ;.

CREATE TABLE table_name (


column_1 data_type,
column_2 data_type,
column_3 data_type
);
Let’s break down the components of a statement:

1. CREATE TABLE is a clause. Clauses perform specific tasks in SQL. By convention, clauses
are written in capital letters. Clauses can also be referred to as commands.

Вам также может понравиться