D
D
Demigodd2018-11-19 14:52:05
SQL
Demigodd, 2018-11-19 14:52:05

How to check 2 conditions together in WHERE?

SELECT *
FROM User
WHERE User.id IS NULL AND User.name = 'google'

That is, here the request returns all Users with name = 'google'.
And I need to check if id is NULL and then check if name is equal to 'google'.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2018-11-19
@Demigodd

Add an additional condition through and.
Read something about logical expressions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question