Oracle Basic Query

null in SQL:

    1. Expressions containing null are all null;

        To solve the problem of null values, you can use the filter function in oracle: nvl(a, b) --> a: the column name to be filtered, b: the default value assigned to him when the column to be filtered is empty;

        

    2.null is never equal to null;

        You can use select 8 from emp where comm is null; instead of comm=null;

        

Connector: ||

    Equivalent to the '+' sign of the string in java, the column is merged with the column;

    

in(set): select * from emp where empno in (10,20);

like: select * from emp where ename like '%ing';





Guess you like

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