Click here to Skip to main content
15,888,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi all


I have two questions

question 1: I am doing another table where i have to display all the customers that are not in a particular area, what is the proper syntax

question 2: how do you increase the credit limit for customers whose credit limit is $10,000 and over by 20%

can someone point me in the right direction.

What I have tried:

for question 1: I have tried this:
SQL
select * from customers where not exist = port of spain 


I idk if that is the correct syntax and for question 2 I have tried this

SQL
select custID, fname,lname, creditLimit
from customers
where creditLimit >= $10000  and creditLimit * 0.20% 


I do not know if that also is the correct answer,
Posted
Updated 6-Apr-18 19:00pm

1 solution

First of all, you haven't shared the table definitions so it's quite impossible to use the exact syntax.

Furthermore, this sounds like homework, and we don't do homework. After all the main idea in homework is that the student learns.

But to get you started. For question 1: Have a look at the comparisons. I think you'll find the exact answer from the documentation: MySQL :: MySQL 5.7 Reference Manual :: 12.3.2 Comparison Functions and Operators[^]

For question 2: to make changes to an existing row, you need to use UPDATE statement. Have a look at MySQL :: MySQL 5.7 Reference Manual :: 13.2.11 UPDATE Syntax[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900