1. When multiple tables are combined, an error "Character Set mismatch" is returned when the nvarchar2 type is encountered"
A: Add to_char (variable or field of nvarchar) to the place where nvarchar is used)
2. When multiple tables are union, the order by statement is incorrect. just delete the order by statement.
A: Oracle only supports the use of order by in the last SELECT statement. If there is only one order by statement, place it in the last sentence. If there are multiple order by statements, think about other statements.
3. nvl () nvl2 () Usage
Nvl (expr1, expr2)-> If expr1 is null, return the value of expr2; if not, return expr1's own value;
Notice: the type of expr1 and expr2 are same!
Nvl2 (expr1, expr2, expr3)-> If expr1 is not null, return the value of expr2; If null, return expr3's own value;
Nullif (expr1, expr2)-> equal return NULL, not equal return expr1
4. If else statement
Sqlserver:
If () begin... end else begin... end
ORACLE:
If... then .... end if; or if ..... then .... else .... end if; or if .... then ..... elsif... then .... end if; if... elsif... elsif .... end if;
5. Output messages
Sqlserser: Print ('') Oracle: dbms_output.putline ('')
6. String concatenation
Select 'funding scheduler-'| to_char (seq_emp.nextval, '123 ')