Full join null padding

Time:2021-4-18

Full join null padding

SELECT   coalesce( NULL , 0) as tianchong FROM DUAL 

SELECT   coalesce( '' , '0') as tianchong FROM DUAL 

 

SELECT A.M, coalesce(B.N, 'X') AS N
  FROM (SELECT 0 AS M
          FROM DUAL
        UNION
        SELECT 1 AS M
          FROM DUAL
        UNION
        SELECT 2 AS M
          FROM DUAL
        UNION
        SELECT 3 AS M FROM DUAL) A
  FULL JOIN (SELECT 0 AS M, '0' AS N FROM DUAL) B
    ON A.M = B.M

 

Recommended Today

Review of SQL Sever basic command

catalogue preface Installation of virtual machine Commands and operations Basic command syntax Case sensitive SQL keyword and function name Column and Index Names alias Too long to see? Space Database connection Connection of SSMS Connection of command line Database operation establish delete constraint integrity constraint Common constraints NOT NULL UNIQUE PRIMARY KEY FOREIGN KEY DEFAULT […]