摘要: 1.AVG()函数 eg./*产品均价设置为小数点后两位。从表中查询1003的商品的均价*/ select round(avg(prod_price)) as 均价 form products where vend_id=1003 2.COUNT()函数——指定列的数目,NULL不计入 eg./** 阅读全文
posted @ 2018-09-10 23:08 弥尔 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 1.显示所有数据库信息 show databases; 2.显示表 use northwind; 连接northwind show tables; 显示表 3.显示表由哪些字段组成,字段的类型 show columns from products; 4.表中的结构 desc products; 5. 阅读全文
posted @ 2018-09-10 22:40 弥尔 阅读(59) 评论(0) 推荐(0) 编辑