编写一条sql命令,sql删除没有中文的表

 

删除包含中文的 和不饱和中文的字段

SHOW create table pages;
drop table if exists `film`;
CREATE TABLE `film` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,

PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=484 DEFAULT CHARSET=utf8;

insert into `film` (name) values('1111113ggfh2');
insert into `film` (name) values('113ggfh2风险');
insert into `film` (name) values('111113gg@fh2');
insert into `film` (name) values('11662@gfh2风听听');

delete from `film` where length( name ) = CHARACTER_LENGTH( name );--删除不包含中文的
delete from `film` where length( name ) = CHARACTER_LENGTH( name );--删除包含中文的
select * from `film`; 


另一种方法是正则
http://blog.itpub.net/703656/viewspace-1043366/
posted @ 2016-04-09 21:21  donaldlee  阅读(269)  评论(0编辑  收藏  举报