/*This SQL script uses Demos.abs database. 
  Please open AbsoluteDatabase\Demos\Data\Demos.abs database file.
  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