首页 > 代码库 > 数据库的一些增删改查的操作
数据库的一些增删改查的操作
select count(*) from ps_product; select count(*) from ps_product_lang; select * from ps_product_lang where id_product=(select count(*) from ps_product_lang); select name,id_product from ps_product_lang where id_product=(select count(*) from ps_product_lang); select name,id_product from ps_product_lang where id_product=; select name,id_product from ps_product_lang where name=‘‘; select count(*) from ps_product where price=0; delete from ps_product where id_product=; delete from ps_product_lang where id_product between 4076 and 4079; delete from ps_product where id_product between 4080 and 4082; delete from ps_category where id_category between 4080 and 4082; delete from ps_product_lang where id_product in(274,233,241,339,654); update ps_product_lang set description=" " where description="";(更改说明) update ps_product_lang set price=price+179;(更改价格) delete from ps_product_lang where id_product%2=0 and id_product>666; update ps_category set id_parent=2 where id_category between 9 and 11; update ps_image set cover = 0 where id_product=5; update ps_image set cover = 1 where id_image=9; select name,id_product from ps_product_lang where name=10465; update ps_product set active = 0 where id_product in (); select count(*) from ps_product where pricr<100; UPDATE `ps_product` SET `price`= concat(round(rand()*200 + 120), ‘.99‘) where price<100; select * from ps_feature where id_feature = 18; select * from ps_feature_lang where id_feature = 18; select * from ps_feature_value_lang where value=http://www.mamicode.com/‘>
数据库的一些增删改查的操作
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。