SQL基础【十二、Like】
生活随笔
收集整理的這篇文章主要介紹了
SQL基础【十二、Like】
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
User表的初始數據如下:
1:找出以li開頭的數據
Select * from user where user_name like?'li%'
2:找出以ry結尾的數據
Select * from user where user_name like?'%ry'
?
3:找出含有a的數據
Select * from user where user_name like?'%a%'
?
4:找出第二個字母是a第四個字母是y的數據
Select * from user where user_name like?'_a_y'
?
?
希望能對大家有所幫助。
總結
以上是生活随笔為你收集整理的SQL基础【十二、Like】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: SQL基础【十一、分页 limit to
- 下一篇: SQL基础【十三、通配符】