📜  比较字段 sql server - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:31.229000             🧑  作者: Mango

代码示例1
SELECT 
  CASE WHEN COLUMN1 = COLUMN2 
    THEN '1' 
    ELSE '0' 
  END 
  AS MyDesiredResult
FROM Table1
INNER JOIN Table2 ON Table1.PrimaryKey = Table2.ForeignKey