Wednesday, January 12, 2011

First topic i have to prepare for the exam is "Retrieving data using the SELECT Statement".

SELECT statement is used to display data from a table. I can list column names to display the data stored in those columns or use the "*" to display all data from a table. For example:

SELECT FIRST_NAME, LAST_NAME
SELECT *
In second part of the clause i need to specify the table from which i want data to be retrieved. For that i am using the FROM statement. For example:

FROM EMPLOYEES

Now we need to put together those two statement and we get

SELECT FIRST_NAME, LAST_NAME
FROM EMPLOYEES


SELECT  *
FROM EPLOYEES

Now we have to end the statement. This can be done using semicolon ";".

SELECT FIRST_NAME, LAST_NAME
FROM EMPLOYEES;

SELECT *
FROM EMPLOYEES;

No comments:

Post a Comment