This sample demonstrates use of subquery in SET clause.
The query works as follows. First, only those entries are picked that have "Ticket_price" 5 of less. Then corresponding venue is taken, its capacity is multiplied by two and set as the new ticket price. Notice that NULL fields are not affected.
update Events e
set Ticket_price = (select Capacity from Venues where VenueNo=e.VenueNo)*2
where Ticket_price <= 5
Download Absolute Database | Learn more |
|
|
Current version: 7.94
Released: February 08, 2023
Price: $ 149
 
|
|
Thanks again for the superb tech support, I was worried I'd hit a brick wall this close to the finish line. Even working on the weekend... you guys rock!!!
Bob Boyd
|
|
|