SQL Tutorial
SQL (Structured Query Language) is used to modify and access data or information from a storage area called database.
This beginner sql tutorial website teaches you the basics of SQL and how to write SQL queries. I will be sharing my
knowledge on SQL and help you learn SQL better. The sql concepts discussed in this tutorial can be applied to most of
database systems. The syntax used to explain the concepts is similar to the one used in Oracle database.
Some Of the most important Sql Commands are as follwes:
SQL SELECT Statement
The most commonly used SQL command is SELECT statement. The SQL SELECT statement is used to query or retrieve data
from a table in the database. A query may retrieve information from specified columns or from all of the columns in the
table. To create a simple SQL SELECT Statement, you must specify the column(s) name and the table name. The whole
query is called SQL SELECT Statement.
Note: SQL is not case sensitive. SELECT is the same as select.
Syntax of SQL SELECT Statement:
SELECT column_list FROM table-name
[WHERE Clause]
[GROUP BY clause]
[HAVING clause]
[ORDER BY clause];
Table-name is the name of the table from which the information is retrieved.
column_list includes one or more columns from which data is retrieved.
The SQL SELECT Statement
The SELECT statement is used to select data from a database.
The result is stored in a result table, called the result-set.
SELECT * Example
Now we want to select all the columns from the "Employees" table.
SQL> select * from employees;
Now we want to select the content of the columns named
"Employee_id", "LastName" and "FirstName" from the table above.
SQL> select employee_id,first_name,last_name from employees;
Next
0 comments:
Post a Comment