數據庫——子查詢和多表查詢

數據準備         子查詢 什麼是子查詢:查詢中的查詢即爲子查詢,一般使用括號將子查詢sql括起來,如下SQL語句: select * from (select * from user_info) users 什麼時候用子查詢:當在查詢過程中需要知道一個已知量的不確定數據時使用子查詢 --查詢出來姓名爲王曉明的所有地址 select * from address where user_id=
相關文章
相關標籤/搜索