数据库
茫然的旅行者
我们自信,我们坚韧不拔!
展开
-
Sql Server
--检索单列数据select prod_name from Products;--检索多列数据select prod_name,prod_price,prod_id from Products--检索所有列select * from Products--DISTINCT关键字select distinct vend_id from Products--限制结果select top 5 prod_n...原创 2018-03-16 17:16:52 · 239 阅读 · 0 评论 -
Sql Server
--函数select vend_name,UPPER(vend_name) as vend_name_upcase from Vendors order by vend_name;select order_num from Orders where DATEPART(yy,order_date)=2012;--聚集函数--求平均select AVG(prod_price)as avg_price ...原创 2018-03-20 11:55:05 · 224 阅读 · 0 评论