Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

compare field sql server

SELECT 
  CASE WHEN COLUMN1 = COLUMN2 
    THEN '1' 
    ELSE '0' 
  END 
  AS MyDesiredResult
FROM Table1
INNER JOIN Table2 ON Table1.PrimaryKey = Table2.ForeignKey
 
PREVIOUS NEXT
Tagged: #compare #field #sql #server
ADD COMMENT
Topic
Name
3+6 =