0

My program of java is connected to a database which has tables Asset_11398 and Emp_11398.. both are connected through a relationship..

i want to write a query which will should show the Assets which are not allocated to employees.. means it should only show the fields where the 'Emp_ID' field is empty.. i have been trying to run it using the query below but i know there is something wrong with it.. can someone please take a look at the query?

ResultSet resultset = statement.executeQuery("select * from Asset_11398 Where Emp_ID = null");
0

1 Answer 1

0

Have you try something like this:

ResultSet resultset = statement.executeQuery("select * from Asset_11398 Where Emp_ID is NULL");
Sign up to request clarification or add additional context in comments.

2 Comments

no.. it isnt working..
I have updated the code block. It should work. Just note that when query a Null col|row, there should use "is" not "="

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.