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

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 09:37:102718browse

mysql

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

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

Statement:
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