Java Web Application Query Is Not Working

91 views Asked by At

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");
1

There are 1 answers

2
Khate On

Have you try something like this:

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