Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Strange Issue - Exists and Not Exists statements not works as expected #28

@psrinivasa2

Description

@psrinivasa2

Strange Issue - Exists and Not Exists statements not works as expected, please find below attached screenshots

image

image

IF NOT EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'dbo' AND TABLE_NAME = 'DatabaseVersionHistory' AND COLUMN_NAME = 'Patch')
BEGIN
print 'Reached Not Exists condition'
END
else
begin
print 'Reached Exists condition'
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions