Learn SQL on your own
This tutorial provides you with easy to understand SQL instructions and allows you to practice while you are learning, using an online SQL interpreter. To learn by practicing your SQL commands, seeing immediate results. You will be able to perform selects, inserts, updates, deletes, and drops on your tables. Note: This SQL tutorial uses the SQLite database engine. The different variants of SQL use slightly different syntax.
If you're already familar with the basics of SQL, you can still use this as a refresher, and practice some SQL statements.
How long does it take to learn SQL? How hard is it to learn SQL? Is easy to learn?
Its not very hard and you can learn it very quickly. Follow this interactive online SQL training for beginners (and for FREE) and in no time you will learn all the necessary knowledge to start working and to be confident to say you know SQL in a job interview.
Are SQL queries/syntax case sensitive?
The SQL Keywords are case-insensitive (SELECT, FROM, WHERE, etc), but are often written in all caps. However in some setups table and column names are case-sensitive.
What is SQL?
SQL stands for Structured Query Language. SQL is used to communicate with a database and SQL is the standard language for relational database management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database. Common relational database management systems that use SQL are: Oracle, Sybase, Microsoft SQL Server, Access, Ingres, etc.
Easy to learn standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to accomplish almost everything that you need to do with a database. This SQL tutorial will provide you with the instruction on the basics of each of these commands as well as allow you to put them to practice using the SQL Interpreter.
What Can SQL do?
- execute queries against a database
- retrieve data from a database
- insert records in a database
- update records in a database
- delete records from a database
- create new databases
- create new tables in a database
- can create stored procedures in a database
- can create views in a database
- can set permissions on tables, procedures, and views
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
Why should you learn SQL?
SQL is an incredibly important and valuable skill employers desire. You can earn really good money, SQL programmers are in high demand. As organizations seek to do more with their data, they will need more individuals with the skills to access and analyze that data. SQL is the skill that enables you to do just that.
Learning SQL will allow you to mine data with greater efficiency, as SQL queries can be easily saved and re-used at any point in time. You can do data manipulation, combine data from multiple sources and manage large pools of data. And you will not have to deal with Excel crashing anymore.
List of databases used by Internet’s biggest websites
- The king of scalability, Google, uses BigTable.
- Facebook uses Hive (Data warehouse for Hadoop, supports tables and a variant of SQL called hiveQL) and Cassandra (Multi-dimensional, distributed key-value store) for Facebook's private messaging.
- Yahoo uses modified PostgreSQL.
- YouTube uses MySQL but they are moving to Google's BigTable.
- Myspace uses SQL Server.
- Twitter and Wikipedia uses MySQL.
- Microsoft uses SQL Server, which is very obvious.
- Flickr uses MySQL.
Facebook, Google, LinkedIn, and Twitter all use MySQL for at least some of their data management. As they all contribute some of their MySQL customizations to a project called WebScaleSQL.
Will SQL become obsolete?
My guess is not for a very, very long time, if ever. Business and specially small business will continue to organize data in a relational manner regardless of the underlying data storage and processing technology.
Table of contents
- SELECT *
- SELECT specific columns
- WHERE ... Equals
- WHERE ... Greater than
- WHERE ... Greater than or equal
- ORDER BY
- LIMIT # of returned rows
- COUNT(*) ... WHERE
- MAX and MIN
- GROUP BY
- Nested queries
- Inner joins
- Multiple joins
- Joins with WHERE
- Left joins
- Table alias
- Column alias
- Self joins