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");
Madhawa Priyashantha
  • 9,633
  • 7
  • 33
  • 60
Nia_925
  • 29
  • 2

1 Answers1

0

Have you try something like this:

ResultSet resultset = statement.executeQuery("select * from Asset_11398 Where Emp_ID is NULL");
Khate
  • 339
  • 1
  • 3
  • 11