SQL?????????????????????
???????????? ???????[ 2017/4/7 10:52:36 ] ????????????? SQL
????????????????SQL?????????????????????????????????:
?????????????????????????????????????? ??????????????£? SELECT ??? FROM ?? WHERE ???? LIKE ????
???????й?????????SQL???????????????
????1??% ?????????0????????????????????????????????????Щ????????????????????????????%%???????
???????? SELECT * FROM [user] WHERE u_name LIKE '%??%'?????u_name?“????”??“??è??”??“????è”??“??????”?????“??”????????????
????????????????u_name?м???“??”????“è”???????????and????SELECT * FROM [user] WHERE u_name LIKE '%??%' AND u_name LIKE '%è%'
??????????SELECT * FROM [user] WHERE u_name LIKE '%??%è%'???????????“????è”????????????????????????“??è??”??
?????????%??????????????%??????????%??%?????????????
????2??_ ?? ???????????????????????????????????????????????????????
???????? SELECT * FROM [user] WHERE u_name LIKE '_??_'????“??????”??????u_name??????????м????????“??”???
?????????? SELECT * FROM [user] WHERE u_name LIKE '??__'????“????è”????name?????????????????“??”???
????3??[ ] ???????????????????е???????????????????????????????????????Χ???????????????????е????????
????????SELECT * FROM [user] WHERE u_name LIKE '[??????]??'?????“????”??“????”??“????”????????“????????”????
??????????[ ] ?????????????01234??abcde??????????д?“0-4”??“a-e”SELECT * FROM [user] WHERE u_name LIKE '??[1-9]'?????“??1”??“??2”??……??“??9”??
??????????“-”????????????λ??'????[-1-9]'??
????Oracle 10g?????汾?÷????
????select * from flow_user where regexp_like(username?? '[??????]??')
????4??[^ ] ??????????????????????????????????? [] ??????????????????????????????????????????
????????SELECT * FROM [user] WHERE u_name LIKE '[^??????]??'?????????“??”??“??”??“??”??“????”??“????”????????? SELECT * FROM [user] WHERE u_name LIKE '??[^1-4]'?????“??1”??“??4”?????“??5”??“??6”??……??“??9”??
???????oracle like ????????????????????like??????regexp_like
????5?????????????????
????* ???????????????????????select * from tbl_user
???????????????????????????????????“%”??“_”??“[”?????????????????????????????“[ ]”??????????????????????д????????????function sqlencode(str)str=replace(str??"["??"[[]") '??????????str=replace(str??"_"??"[_]")str=replace(str??"%"??"[%]")sqlencode=strend function
?????????????????????????????ú??????????????????????????????????????????????????????? Select * FROM user Where name LIKE '??[^1-4]'
???????? ??'????[^1-4]??'??????е???????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11