数据的高级查询

—数据的高级查询–注: –以以下列子为例 create table product ( p_id int primary key identity, p_name varchar(150), p_type int, p_desc varchar(400),–description描述 p_price money, p_style varchar(50) )  insert into product(p_name,p_type,p_desc,p_price,p_style) select ‘古筝’,1,’菊花台’,540.5,’民族乐器’ union select ‘二胡’,1,’菊花’,54.5,’民族乐器’ union select ‘扬琴’,2,’asd’,180,’民族乐器’ union select ‘琵琶’,2,’out5′,230,’民族乐器’ union select ‘钹’,3,’out1′,1888.8,’民族乐器’ union select ‘笛子’,1,null,540.5,’民族乐器’ union select ‘板胡’,1,’花菊台’,1000,’民族乐器’  select * from product –使用like、between、in进行查询 –使用like进行模糊查询 select * from product where p_desc like ‘菊%’ –注:%可以代替任意长度的字符 select * from product where p_desc like ‘菊_’ –注:_代替一个字符 select * from product where p_desc like ‘out[5, 1]‘ –注:[]括号中出现的任意一个字符 select * from product [...]

转载于:https://www.cnblogs.com/joypen/archive/2008/11/12/1692979.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值