📄 subquery_update.sql
字号:
/*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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -