(13)like筛选出指定列的格式,%属于通配符。如y%匹配出以y开头的数据,反之,%y匹配出以y结尾的数据,%yu%就是匹配出中间含有yu字符的列表数据。NOT 关键字,您可以选取不匹配模式的记录。

select *from student where name like '%y';

select *from student where name like 'y%';

select *from student where name not like 'y%';

数据库学习回顾(二)

数据库学习回顾(二)

(14)通配符_代表替代一个字符,如匹配出nn与之有关的前后一个字符的数据

select *from student where name like'_nn_';

数据库学习回顾(二)

 

(15)用REGEXPNOT REGEXP操作正则表达式。

如:  匹配出姓名以有ajuc开头的  select *from student where name REGEXP '^[ajuc]';

数据库学习回顾(二)

 

 

 

相关文章:

  • 2021-06-27
  • 2021-12-15
  • 2021-06-19
  • 2021-08-30
  • 2022-12-23
  • 2021-06-13
  • 2021-11-22
猜你喜欢
  • 2021-12-23
  • 2021-09-04
  • 2022-02-20
  • 2021-08-29
  • 2021-04-04
  • 2022-12-23
  • 2021-11-15
相关资源
相似解决方案