Question: Write in SQL Composite Conditions: AND, OR, NOT GENERAL FORMAT You can combine basic conditions in your queries using the following keywords AND (both conditions

Write in SQL Composite Conditions: AND, OR, NOT GENERAL FORMAT You canWrite in SQL

Composite Conditions: AND, OR, NOT GENERAL FORMAT You can combine basic conditions in your queries using the following keywords AND (both conditions must hold) OR (one of the conditions must hold) NOT (the condition must not hold) EXAMPLES The following query returns all people in Maryland (MA) with the surname 'Lang': SELECT FROM CUSTOMER WHERE FAMILYNAME = 'LANG' AND STATE = 'MD'; The following query returns all people who either live in Maryland (MA) or have the surname 'Lang: SELECT FROM CUSTOMER WHERE FAMILYNAME- ' LANG' OR STATE = 'MD'; DO IT YOURSELF (DIY) Write a query to return all customers who's middle initial is before in the alphabet. or after T SAVE THIS QUERY IN THE DATABASE AS "11_CUSTOMERS_WITH_MIDDLE INITIAL BEFORE G_OR_AFTER_T" ORDER BY clause GENERAL FORMAT The general format of an ORDER BY clause is: SELECT FROM

WHERE ORDER BY [ASC/DESC] EXAMPLES The following query returns all male customers in alphabetic order of surname SELECT FROM CUSTOMER WHERE GENDER = 'M' ORDER BY FAMILYNAME ; The following query returns all male customers in reverse alphabetic order of surname SELECT FROM CUSTOMER WHERE GENDER 'M' ORDER BY FAMILYNAME DESC; DO IT YOURSELF (DIY) Write a query to return the cities of all customers (with no repeating rows), in reverse alphabetic order. SAVE THIS QUERY IN THE DATABASE AS "12 ALL_UNIQUE_CITIES_REVERSE_ALPHABETIC

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!