SQL IN List – Multi-value comparison IN List

SQL IN Liste Multi Value

SQL IN list SQL IN Statement (IN lists) can only process and validate 1000 values. Everything about it returns an error. Here’s an example to demonstrate an IN list. Here only employees and workers are shown, which identification number is in the IN list.  SELECT * FROM emp WHERE 1=1 AND empNo IN (1, 2, … Read more

Difference between SQL NVL and NVL2

NVL NVL2

NVL VS NVL2 The difference between the SQL functions NVL and NVL2 is, that when using the function NVL2 you can set different values for NULL and NOT NULL. NVL only checks and analyzes the first expression. If the expression is NOT NULL, the function outputs the value of the field. If a NULL value … Read more

SQL Default Value if no row is returned

SQL

Sometimes default values are necassary. Normally you can use NVL or NVL2 when you get NULL values as return value. But it is also possible, that no row is returned. In this case, NVL or NVL2 is not working, cause you get no value back – not even NULL. Therefore, there are some options – … Read more

Commit and Rollback SQL Developer

Commit Rollback SQLDEV

The SQL Developer sets implicit automatic COMMITs. This COMMIT is subconsciously and automatically canceled in the following situations. (1) SQL Developer quits normally, with no COMMIT or ROLLBACK statement. In this case, a COMMIT is sent before the program is terminated. However, this does not happen in the event of a system failure of the … Read more