1

I'm using postgresql and getting this sql error:

org.postgresql.util.PSQLException: ERROR: invalid input syntax for type date: "\N"

Here is my code:

SELECT * FROM person WHERE  person.dob = '\N' OR person.dob = '1994-01-16';

How can I allow Null values? so what should I add to this SQL statement?

1 Answer 1

2

Try this following code:

SELECT * FROM person WHERE  person.dob is null OR person.dob = '1994-01-16';
Sign up to request clarification or add additional context in comments.

8 Comments

@ErtuğrulÇetin Fantastic! don't forget accept the answer :)
of course but it says I need to wait 6 mins so I'm waiting :)
also for updating and inserting(nulls) what should I use?
@ErtuğrulÇetin Aah ah ah... for that answer is another price ;)
ahahahha come on :)))
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.