I try to select max value from table
SELECT MAX(cid) FROM itemconfiguration;
However when table itemconfiguration is empty th
itemconfiguration
Just use Coalesce or NVL to handle NULLs.
The following code will return 0 if MAX(cid) is NULL
MAX(cid)
SELECT COALESCE(MAX(cid), 0) FROM itemconfiguration