Access over 35 million academic & study documents

Sql Query

Content type
User Generated
Subject
MySQL
School
Colorado State University Global Campus
Type
Homework
Rating
Showing Page:
1/4
Running Head: PERFORMING AN ADVANCED MYSQL QUERY 1
Performing an Advanced MySQL Query
Emmanuel Azugbene
Colorado State University Global Campus
ITS 410 Database Management
Dr. Manish Patel
27 April 2021

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/4
PERFORMING AN ADVANCED MYSQL QUERY 2
Performing an Advanced MySQL Query
Query
SELECT officeCode, phone, addressLine1, addressLine2,
state, postalCode, country
FROM offices
WHERE city IN ('San Francisco', 'Paris', 'Sydney', 'London')
ORDER BY officeCode;
Result
Query 2 Without listing cities in San Francisco, Paris, Sydney, and London
The NOT operator is used to retrieve data from a database where the specified condition
is false (w3schools, n.d.). The following query will only display office information located in
any city except for San Francisco, Paris, Sydney, and London.
SELECT officeCode, phone, addressLine1, addressLine2,
state, postalCode, country
FROM offices
WHERE city NOT IN ('San Francisco', 'Paris', 'Sydney', 'London')
ORDER BY officeCode;

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/4

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 4 pages?
Access Now
Unformatted Attachment Preview
Running Head: PERFORMING AN ADVANCED MYSQL QUERY Performing an Advanced MySQL Query Emmanuel Azugbene Colorado State University Global Campus ITS 410 – Database Management Dr. Manish Patel 27 April 2021 1 PERFORMING AN ADVANCED MYSQL QUERY Performing an Advanced MySQL Query Query SELECT officeCode, phone, addressLine1, addressLine2, state, postalCode, country FROM offices WHERE city IN ('San Francisco', 'Paris', 'Sydney', 'London') ORDER BY officeCode; Result Query 2 – Without listing cities in San Francisco, Paris, Sydney, and London The NOT operator is used to retrieve data from a database where the specified condition is false (w3schools, n.d.). The following query will only display office information located in any city except for San Francisco, Paris, Sydney, and London. SELECT officeCode, phone, addressLine1, addressLine2, state, postalCode, country FROM offices WHERE city NOT IN ('San Francisco', 'Paris', 'Sydney', 'London') ORDER BY officeCode; 2 PERFORMING AN ADVANCED MYSQL QUERY Result 3 Running Head: PERFORMING AN ADVANCED MYSQL QUERY References w3schools. (n.d.). SQL AND, OR, NOT Operators. Retrieved from https://www.w3schools.com/sql/sql_and_or.asp. 4 ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Really helped me to better understand my coursework. Super recommended.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4