您的当前位置:首页正文

MySQL不等于怎么写

来源:花图问答

MySQL不等于怎么写

MySQL中不等于使用<>和!=来表示。<> 与!=都是不等于的意思

区别:

1、<>在任何SQL中都起作用;

2、!=在sql2000中不兼容。

使用示例:

查询表中aa不等于1的数据:

select * from table where aa <> 1;
select * from table where aa != 1;

推荐: