like操作符
通配符只能用于字符串查询
- % 指任意字符出现任意次数,包括0次,不包括NULL
SELECT username,weight,age FROM userinfo WHERE username LIKE '张%'
- _ 指任意字符出现1次
SELECT username,weight,age FROM userinfo WHERE username LIKE '张_'
通配符只能用于字符串查询
SELECT username,weight,age FROM userinfo WHERE username LIKE '张%'
SELECT username,weight,age FROM userinfo WHERE username LIKE '张_'