Adsense
Popular Posts
- Install APXS in Redhat Linux
- MySQL workbench -"Could not decrypt password cache"
- Transfer modules between sites
- JavaScript, remove trailing insignificant zeros after toFixed function
- Set Windows path command line
- datatable order by nunmeric
- MySQL date created and date modified
- super(props) in React
- PHP, dump varailbes in a format way
- React: connect(mapStateToProps, mapDispatchToProps)
Friday, June 26, 2015
MySQL NULL column during comparison
In MySQL table, I have column WorkPermit, 5 values, 'N', 'N', 'N', NULL, NULL
When we do MySQl statement WorkPermit !=N, we expect to get 2, but result return nothing
as NULL not participate comparision in not equal.
So when we use != (not equal) in MySQL, we should add condition
( WorkPermit !=N or WorkPermit IS NULL)
Labels:
MySQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment