zhoujun.g 发表于 2016-11-12 10:45:33

db2转义

1、对"%"的转义
   select * from student where description like '%!%%' escape '!'
   本sql解释为取出表student中所有字段description中含有"%"的记录。
2、对"_"的转义
   select * from students where description like '%!_%' escape '!'
   本sql解释为取出表student中所有字段description中含有"_"的记录。
3、对"'"的转义
   select * from students where description like '%''%''
页: [1]
查看完整版本: db2转义