How to check account existence in its own database?

Good evening.
A little thinking, I thought. Came up with code (I am not the pioneer, I just guessed) - "SELECT NULL FROM `users` WHERE `login`=*username*", and so, this code will work?
How I imagine this query - "Get anything from the user table for login=**" essentially, we want to get something, but not necessary.
In General, if the query to work?
June 10th 19 at 15:11
2 answers
June 10th 19 at 15:13
Solution
In General, if the query to work?

will, but will return either NULL or nothing
it is better to write and use a placeholder:
"SELECT 1 FROM `users` WHERE `login`=*username*"
And that will return in this case? - eveline21 commented on June 10th 19 at 15:16
1, if the user is found, otherwise - NULL - Gwendolyn.Pfeff commented on June 10th 19 at 15:19
June 10th 19 at 15:15
SELECT COUNT do not save on matches.

Find more questions by tags SQLMySQL