首页 > 试题广场 >

在京东商城的商品展示页面下方,总会有一些关于本商品的客户评论

[问答题]
在京东商城的商品展示页面下方,总会有一些关于本商品的客户评论信息。模仿该评论模块,有如下三个表:price(商品表),userinfo(用户表),threads(评论主题表)

1.请画出以上三张表对应实体的ER图(实体字段标明主键外键即可,用箭头表示)
2.在product表中加入一条新纪录(1004,'京东空调',3000).请写出对应的SQL语句。
3.更新product表中pid为1001的商品的价格为3666。请写出对应的SQL语句。
4.在product表中查询pname中带有"京"的商品。请写出对应的SQL语句。
5.查询product表中price在1000.0与3000.0之间的所有商品并按照价格降序排序。
1.请画出以上三张表对应实体的ER图(实体字段标明主键外键即可,用箭头表示)


2. 在product表中加入一条新纪录(1004,'京东空调',3000).请写出对应的SQL语句。
Insert into product (pid, pname, pprice) values (1004,'京东空调',3000);

3.更新product表中pid为1001的商品的价格为3666。请写出对应的SQL语句。
update product set pprice=3666 where pid = 10001;

4.在product表中查询pname中带有"京"的商品。请写出对应的SQL语句。
select * from product where pname like "%京%";

5.查询product表中price在1000.0与3000.0之间的所有商品并按照价格降序排序。
select * from product where price between 1000.0 and 3000.0 order by price desc;

编辑于 2015-01-09 15:05:07 回复(1)
1、price product_id product_name product_price
userinfo userid username
threads userid comment

2、Insert into product(‘’product_id‘ ,’ product_name‘ ,’product_price‘)   values ( 1004,'京东空调',3000 );
3   update  product set  product_price  = 3666 where pid=' 1001' ;
4   select  * from product  where pname like‘%京%’;
5  select * from  product  where price between '1000' and '3000' order by price descend
发表于 2017-04-04 21:22:33 回复(0)
1.
2.INSERT INTO product(pid,pname,price) VALUES (1004,'京东空调',3000)

3.UPDATE product SET price = 3665 WHERE pid = 1001

4.SELECT * FROM product WHERE  pname LIKE '%%'

5.SELECT * FROM product WHERE price BETWEEN 1000.0 AND 3000.0 ORDER BY price DESC

编辑于 2018-04-08 17:18:18 回复(0)
INSERT INTO product(pid, pname, price) VALUE(1004, ‘京东空调’, 3000);
UPDATE product  SET pid=3666 WHERE pid=1001;
SELECT pname FROM product WHERE pname LIKE "%京%";
SELECT price FROM product WHERE privce BETWEEN 1000.0 AND 3000.0 ORDER BY PRICE DESC;

发表于 2016-09-05 15:25:02 回复(0)
实体的表示:用长方形 联系的表示:用菱形,1:1、1:n (m:1)、(m:n) 属性的表示:用椭圆形
发表于 2016-09-05 18:26:52 回复(0)
1、 2、INSERT INTO product(pid,pname,price) VALUES(1004,'京东空调',3000);
3、UPDATE product SET price=3666 WHERE pid=1001;
4、SELECT pid FROM product WHERE pname LIKE "%京%";
5、SELECT pid FROM product WHERE price>=1000.0 AND price<=3000.0 ORDER BY price DES;

发表于 2016-09-04 15:21:59 回复(0)
2、insert  into  product(pid,pname,price)  values(1004,'京东空调',3000);
3、update product  set  price=1001  where  pid=1001;
4、select  pname  from  product  where  pname  like  '%"京"%' ;
5、select  pname  price  from  prodect   where  price  between 1000 and 3000;
发表于 2016-08-31 21:49:08 回复(0)
1 什么是ER图
2. insert into product values(1004,'京东空调',3000);
3. update product set price=3666 where pid=1001;
4. select *from product where pname like '%京%';
5. select *from product where price in(1000.0,3000.0) order by price desc;

发表于 2016-06-07 20:53:10 回复(0)
2.insert into product(Pid,Pname,Pice)values(1004,'京东空调‘,3000)
3.update product set Price = 3666 where pid = 1001
4.select * from product where pname like '%京%’
5.select * from product where price <3000.0 and price>1000.0 order by price desc
发表于 2016-04-08 17:09:28 回复(0)
各位大神太牛了,我只是做个笔记记住一下
2.INSERT INTO product(Pid,Pname,Pprice) Values(1004,"京东空调",3000);
3.UPDATE product SET Pprice=3666 WHERE Pid=1001
4.SETECT * FROM product WHERE Pname LIKE '%京%'
5.SETECT *FROM product WHERE Pprice<3000.0 AND Pprice>1000.0 ORDER BY price DESC

发表于 2015-09-22 23:16:19 回复(0)
1、
2、INSERT INTO product VALUES(1004,'京东空调',3000);
3、UPDATE product SET price=3666 WHERE pid=1001;
4、SELECT pname FROM product WHERE pname='%%';
5、SELECT price FROM product WhERE price>1000 AND price<3000 ORDER BY price DESC;
发表于 2015-06-30 11:25:09 回复(0)
1、price表:price_id
   userinfo表:urser_id
   threads表: threads_id    price_id    user_id

2、insert into pruduct(pid,pname,price) values(1004,'京东空调',3000);

3、update product set price = 3666 where pid = 1001;

4、select * from product where pname like '%京%';

5、select * from product where price >= 1000 and price <= 3000 order by price desc;
发表于 2015-04-01 10:28:11 回复(0)
1  商品表里面就商品信息  用户表里就用户信息  评论主题表 有商品id和用户id 
2 insert into product(pid,pname,price)values(1004,'京东空调',3000);
3 update product set price=3666 where pid= 3666
4 select * from  product where pname like '%京%'
5 select * from product where price>=1000 and price<=3000 order by pid desc
发表于 2015-03-19 15:08:05 回复(0)

2.INSERT INTO product values(1004,'京东空调',3000);
3UPDATE product SET price=3666 WHERE pid=1001;
4SELECT * FROM product WHERE pname LIKE %京%;
5SELECT * FROM product WHERE price BETWEEN 1000 AND 3000;
发表于 2014-12-15 12:15:37 回复(0)
2 Insert into product(pid,pname,price) values(1004,'京东空调',3000);
3 update product set price=3666 where pid=1001;
4 select * from product where pname like %'京';
5 select * from product where price>1000&&price<1000 order by price desc;
发表于 2014-12-03 14:13:11 回复(0)

发表于 2014-11-18 21:13:30 回复(0)
1
发表于 2014-11-10 20:29:32 回复(0)
1.
2.insert into product(pid,pname,price)  VALUES (1004,'京东空调',3000);
3.update product set price =3666 where  pid =1001;
4.select * from product  where pname like '京'; 
5.select * from product  where price between 1000 and 3000 DESC;
发表于 2014-11-07 12:33:24 回复(0)
2.insert into  product  values (1004,'京东空调',3000)
3.update  product  price=3666 where pid=1001
4.select  * from  product where pname like '%京%'
5.select  *  from product  where  price between 1000 and 3000 order by price  desc
发表于 2014-11-06 12:11:36 回复(0)
2、insert into product(pid,pname,price) values (1004,'京东空调',3000);
3、updata product set price=3666 where pid=1001;
4、select * from product where pname like '%京%';
5、select * from product where price between 1000.0 and 3000.0 order by price desc;
发表于 2014-11-02 00:38:34 回复(0)