Tuesday, April 28, 2015

Homework no. 6

On a piece of paper, write MYSQL commands to do the following tasks:

1. Show current user.

2. Display all database.

3. Use a database called dbMybusiness.

4. Display all tables inside dbMybusiness.

5. Create a table called products with the following column name
                 prodID, prodName, prodSupplier, prodUnitPrice.  Decide the corresponding data type for each column name, Keys and constraints.

6. Display all records from table customers.

7. Display all records combining cusFirst and cusLast with column heading Fullname.

8. Delete a record with cusID  no 12.

9. Display all records from table customer that lives(cusAddress) in Los Angeles.

10. Discuss the difference between Primary key and Foreign key.

No comments:

Post a Comment