SQL筛选问题在线等

来源:百度知道 编辑:UC知道 时间:2024/05/30 23:32:00
表为code 筛选字段ccode select ccode form code 查询出 1001 1002 1003001 1003002 等等 如何筛选 才能把4位的去掉,只显示大于4位的编码!!

select * from code where ccode >9999

select carName from ks_car where len(carName) >4

select ccode from code where LENGTH(ccode)>4
不知道你的数据库是什么,这个方法对mysql有效

楼上的是mssql的

你把筛选字段设为大于9999的就可以嘛``