Вопрос:
Если я выполню следующий код, то каким будет вывод?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
declare @tbl table(id int) insert @tbl select 10 --Запрос 1: if exists(select 1/0 from @tbl where id=10) select 1 else select 2 ---Запрос 2: if exists(select 1/0 from @tbl where id=20) select 1 else select 2 |
1. Варианты ответов