SELECT cust.name,rcVBles.balance,……other columns SELECT cust.name,rcVBles.balance,……other columns FROM cust,rcvbles WHERE cust.customer_id = rcvlbes.customer_id AND rcvblls.balance>0 AND cust.postcode>"98000" ORDER BY cust.name
SELECT cust.name,rcvbles.balance,……other columns SELECT cust.name,rcvbles.balance,……other columns FROM cust,rcvbles WHERE cust.customer_id = rcvlbes.customer_id AND rcvblls.balance>0 ORDER BY cust.name INTO TEMP cust_with_balance
然后以下面的方式在临时表中查询:
复制代码 代码如下:
SELECT * FROM cust_with_balance WHERE postcode>"98000"