Details to pay attention to when querying oracle sql

 

1. When oracle judges date data, the judgment of null value

--oracle When judging date data, the judgment of null value should pay attention to:
SELECT tp.DISPLAY, tp.STATUS, tp.ISROBTICKET, tp.ROBTICKETTIME,tp.PRODUCTID
  FROM t_product tp
 WHERE -- tp.ROBTICKETTIME is null -- records with null values ​​can be found
 		-- tp.ROBTICKETTIME <> null -- No record with value can be found
		-- tp.ROBTICKETTIME != null -- No record with value can be found
		   tp.ROBTICKETTIME < sysdate -- compare directly to remove records with null values
       and tp.PRODUCTID in(4416735,11763413, 4348012);

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326525352&siteId=291194637