0% found this document useful (0 votes)
372 views

SQL Assignment

The document describes a SQL assignment involving a database table of customer information including name, email, date of birth, and phone number. The assignment tasks include using SQL statements to select, modify, add, and remove data from the table based on various criteria like name, date of birth, and applying logical operators.

Uploaded by

Mahesh Dasari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
372 views

SQL Assignment

The document describes a SQL assignment involving a database table of customer information including name, email, date of birth, and phone number. The assignment tasks include using SQL statements to select, modify, add, and remove data from the table based on various criteria like name, date of birth, and applying logical operators.

Uploaded by

Mahesh Dasari
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

SQL Assignment

Table: Customers
FirstName

LastName

Email

DOB

Phone

John

Smith

[email protected]

2/4/1968

626 222-2222

Steven

Goldfish

[email protected]

4/4/1974

323 455-4545

Paula

Brown

[email protected]

5/24/1978

416 323-3232

James

Smith

[email protected]

10/20/1980

416 323-8888

SQL Commands:
1. Apply SELECT statement arbitrarily to select data from the above database table.
2. Apply SQL DISTINCT clause with the SELECT statement to return Last name and Phone
numbers from the above database table.
3. Apply SQL WHERE clause to select customers conditionally (for example customers
having last name Smith.
4. Repeat item 3 to select customers who are younger than 40 years old.
5. Add the following individual to the above table using an SQL statement:
Peter Hunt, [email protected], 1/1/1974, 626-888-7777.
6. Modify the Steven Goldfishs date of birth to 5/10/1974.
7. Remove James Smith from the above database table.
8. Reorder the above database table based on the customers age from youngest to
oldest.
9. Apply SQL AND clause to select James Smith.
10. Apply SQL OR clause to select all customers having First Name James or Paula.

You might also like