joi, 21 februarie 2013

Section 12 Database Design

SQL INTRODUCTION: QUERYING THE DATABASE
Examine the follolowing SELECT statement.
SELECT *
FROM employees;
This statement will retrieve all the rows in the employees table. True or False?
True
          
What command retrieves data from the database?
SELECT
          
What command can be used to show information about the structure of a table?
DESCRIBE
         
What command do you use to add rows to a table 
INSERT
          
What command can be added to a select statement to return a subset of the data?
WHERE
          

BASIC TABLR MODIFICATIONS
The f_customers table contains the following data:
ID       Name  Address          City     State    Zip
1          Cole Bee         123 Main Street          Orlando          FL       32838
2          Zoe Twee        1009 Oliver Avenue   Boston            MA     02116
3          Sandra Lee     22 Main Street            Tampa FL       32444
If you run the following statement,
   DELETE FROM F_CUSTOMERS
   WHERE STATE='FL';
How many rows will be left in the table?
1
          
The SQL statement ALTER TABLE EMPLOYEES DROP COLUMN SALARY will delete all of the rows in the employees table. True or False?
False
          
What will the following statement do to the employee table?
ALTER TABLE employees ADD (gender VARCHAR2(1))
Add a new column called GENDER to the EMPLOYEES table

Niciun comentariu:

Trimiteți un comentariu