Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-06 09:37:10
Original
2646 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:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!