MySql——select 语句格式

select select_list

[into new_table_name]

from table_source

[where search_conditions]

[group by group_by_expression]

[having search_conditions]

[order by order_expression [ASC|DESC]]

子查询

select cust_id
from orders
where order_num in (select order_num from orderitems where prod_id='内裤');

posted @ 2021-12-15 15:36  remix_alone  阅读(11)  评论(0)    收藏  举报