SQL的基本语句
Select Insert Update Delete
SQL性能优化
案例分析
Select语句基本语法
SELECT select_list[INTO new_table_name]FROM table_list[WHERE search_conditions][GROUP BY group_by_list][HAVING search_conditions][ORDER BY order_list [ASC | DESC] ]
例1:
取出表YK_KCMX中符合是西药的库存并按拼音代码来排列显示
Select YK_KCMX.* ,YK_TYPK.PYDM
From YK_KCMX,YK_TYPK
Where YK_KCMX.YPXH=YK_TYPK.YPXH AND YK_TYPK.TYPE=1 Order BY YK_TYPK.PYDM
|
|