Insert into table (testcol) values ('')
The testcol field has been designed as not null during design, but we need to know that in SQL Server, null and space are different, that is, the preceding statement inserts an empty field, but is not null. It is considered to be a violation of non-null condition constraints only when this field is not inserted in our insert statement, here, the expression in English may be more accurate. If null is translated into "null", it may be easy to confuse. In addition, if our field is int type, if we insert null, it will get a 0, that is, the ms SQL server will automatically help us handle the conversion of spaces.
However, in Oracle, this convenience does not exist. We must strictly follow the rules for insertion. That is to say, we want to meet the design constraints of not null by inserting null in the view, it is no longer successful. We must insert actual content to conform to the not null constraint.
Similar to some details, when we design a system that meets both ms SQL and Oracle, it is especially common for us to deal with it, in this aspect, we must strictly regulate our SQL scripts.ProgramThe processing statement must be strictly controlled by conditions. Otherwise, similar problems may cause us to fall into a nightmare after debugging ~