SQL Tutorial
Basic SQL Commands
© 2013 1keydata.com All Rights Reserved
Agenda
• Database Basics
• SQL Commands
– SELECT … FROM
– WHERE
– ORDER BY
– GROUP BY
– HAVING
© 2013 1keydata.com All Rights Reserved
Database Basics
In a relational database, data is stored in tables.
Tables
Database
© 2013 1keydata.com All Rights Reserved
Database Basics
Each table consists of columns and rows. Each column is a
field in a record, and there is a column name associated with
each column. Columns
Tables
Database
© 2013 1keydata.com All Rights Reserved
Database Basics
Each row represents one record. When we say how many
records we have, we are referring to the number of rows.
Columns
Tables
Rows
Database
© 2013 1keydata.com All Rights Reserved
SELECT … FROM
SQL is structured similar to the English language. The basic
command for retrieving data from a database table is to
SELECT data FROM a table. Not surprisingly, the keywords
"SELECT" and "FROM" make up the core of a SQL
statement.
The syntax for “SELECT… FROM” is:
SELECT “COLUMN_NAME”
FROM “TABLE_NAME”
© 2013 1keydata.com All Rights Reserved
Interesting, right?
This is just a sneak preview of the full presentation. We hope you like
it! To see the rest of it, just
click here to view it in full on PowerShow.com. Then, if you’d like, you
can also log in to PowerShow.com to download the entire
presentation for free.