HomeSimple Queries in SQL Write a query on the customers table whose output will exclude all customers with a rating 100, unless they are located in Shimla. 9 Comments Facebook Twitter Q. Write a query on the customers table whose output will exclude all customers with a rating <= 100, unless they are located in Shimla.Answer =Select * from customersWhere rating > 100 or city = “Shimla” ;
the question is saying to exclude but the code that you've typed will do the opposite and include them.
ReplyDeleteOk.
Deleteit is correct as it says unless it is from shimla
DeleteExclude krna h ap to include kr rahe ho
Deleteso what will be the real answer then??
ReplyDeleteAnswer is correct.
Deletethanks
ReplyDeletethe question is asking to display all records where rating >100 and every record from shimla so the query would be:
ReplyDeleteselect * from customers
where rating >100 or city = "shimla";
Sorry, I have corrected it.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )