SELECT * FROM
table_emp a,
table_phone b,
table_type c
where a.emp_tab_phone=b.phone_ffk and
a.emp_tab_dept=c.type_num and
a.emp_id=1;
table_emp a,
table_phone b,
table_type c
where a.emp_tab_phone=b.phone_ffk and
a.emp_tab_dept=c.type_num and
a.emp_id=1;
已经让数据库进行了索引优化,不会产生全表检索的。数据库没有那么傻。
SELECT *
~~~~~~~~~~