在表中查看需求
查询成本低于10元的水果信息。
select * from products where 成本<10
将所有蔬菜的成本上调1元。
update products set 成本=成本+1 where 种类='蔬菜'
查询成本大于3元并小于40元的产品信息,并按照成本从高到低的顺序显示结果。
select * from products where 成本>3 and 成本<40 order by 成本 desc
查询成本最高的5个产品信息。
select top 5 * from products order by 成本 desc
查询有哪些产品种类。
select distinct 种类 from products
将products表中所有水果的名称、种类和出厂日期信息并插入新表 products_new中。
select 名称,种类,出厂日期 into products_new from products