Home > Database > Mysql Tutorial > mysql判断查询结果是否存在,存在输出1不存在输出0

mysql判断查询结果是否存在,存在输出1不存在输出0

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:37:10
Original
2733 people have browsed it

mysql

<code> IF EXISTS (SELECT * FROM table WHERE condition) SELECT '1' ELSE SELECT '0';</code>
Copy after login

类似这种语义,mysql中可以实现吗

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template