这个语法有点神奇,记下。
但觉得用处有限吧。
mysql> SELECT a.account_id, a_cust_id, a.open_date, a.product_cd -> FROM account AS a INNER JOIN -> (SELECT emp_id, assigned_branch_id -> FROM employee -> WHERE start_date < '20017-01-01' -> AND (title = 'Teller' OR title = 'Head Teller')) AS e -> ON a.open_emp_id = e.emp_id -> INNER JOIN -> (SELECT branch_id -> FROM branch -> WHERE name = 'Woburn Branch') as b -> ON e.assigned_branch_id = b.branch_id;