当前位置:Gxlcms > 数据库问题 > MYSQL 部分练习题

MYSQL 部分练习题

时间:2021-07-01 10:21:17 帮助过:4人阅读

女”,13980011001)

 

insert into customer values("0421f901","wu","女",13980011001);

 

2. 往基本表Commodity中插入一条商品记录(“03110408591”,“牙膏”,“保洁公司”,5.00

 

insert into commodity values("03110408591","牙膏","保洁公司",5.00);

 

3. 修改“WANGYAN”顾客定购商品的记录交货日期为2005-12-25

 

update Orderbook set takedate=‘2005-12-25‘ where csid=(select id from custmoer where name = "WANGYAN");

 

4. 把“雀巢奶粉”的定购商品记录全部删去。

 

delete count,bookdate,takedate from orderbook where csid=(select id from
commodity where name="雀巢奶粉");

  

5. 查询“ANAN”顾客的手机号和住址。

 

select mobile,address from customer where name="ANAN";

  

6. 查询商品的平均价格高于75元钱的厂商名称。

 

select MANUFACTURE from Commodity where PRICE in (select avg(PRICE) from Commodity and avg(PRICE)>75);

    

7. 查询顾客的定购信息,并按订货日期升序排列,若订货日期相同,则按定购数量降序排列。

 

select * from orderbook order by bookdate asc,count desc;

 

MYSQL 部分练习题

标签:基础   font   信息   har   table   bsp   厂商   set   creat   

人气教程排行