Check out example codes for "SQL check if record exist". It will help you in understanding the concepts better.

Code Example 1

SELECT column_name(s)
FROM table_name
WHERE EXISTS
(SELECT column_name FROM table_name WHERE condition);

Learn ReactJs, React Native from akashmittal.com