inro sql question -
we starting subqueries, , have bit of toughie(for me, anyways). have customers table, has attribute of creditlimit. have orders table has ordernum, orderdate,quantity, amount. need increase credit limit of customer has order exceeds credit limit. then, take customer , update credit limit plus 1000. help.
i'm assuming there primary-foreign key relationship between customers , orders table.
update customers set customers.creditlimit = customers.creditlimit + 1000 exists ( select * orders orders.amount > customers.creditlimit , orders.customernumber = customers.customernumber )
Comments
Post a Comment