Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to find muti column name exists in sql server

IF EXISTS 
    (
      SELECT *
      FROM INFORMATION_SCHEMA.COLUMNS
      WHERE TABLE_NAME = 'Table Name'
      AND(COLUMN_NAME = 'column 1'
      or COLUMN_NAME = 'column 2'
      or COLUMN_NAME = 'column 3'
      or COLUMN_NAME = 'column 4')
    )
    SELECT 'Column exists in table' AS[Status];
    ELSE
    SELECT 'Column does not exist in table' AS[Status];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #muti #column #exists #sql #server
ADD COMMENT
Topic
Name
4+8 =