Run the following code declare @t table(i int unique) insert into @t select 1 union all select null union all select null You will get the following error Msg 2627, Level 14, State 1, Line 3 Violation of UNIQUE KEY constraint 'UQ__#A989971__3BD019979D26A3BB'. Cannot insert duplicate key in object...
Without running this query, can you guess the output? Query : select 999'''45' Output : Result 1 : Incorrect syntax near ' Result 2 : 999 Result 3 : 999'45 Result 4 : invalid column name 45
Without running these queries can you find out the query that would throw an error? 1 select 7*-2&.3 2 select 7|2&-3 3 select 7+-(.2)%(+3) 4 select ((7&2%3))
Run this code select $k You will get following error Msg 126, Level 15, State 1, Line 1 Invalid pseudocolumn "$k". What is the pseudocolumn in SQL Server?
Out of these four queries, only one query will throw an error. Without running these queries find out the query and error message that it would generate. Queries Query 1 : select top 1 1 from sysobjects,syscolumns where 1=1 Query 2 : select top 1 1 from syscolumns,syscolumns where 1=1 Query 3 : select...
Without running the query, can you guess the answer? Query select 100.-89_90 Answers Answer 1 : Incorrect syntax near . Answer 2 : _79 Answer 3 : Incorrect syntax near 89_90 Answer 4 : 11
Without running this query, can you guess what would be the answer? Query select 3+-+-+-++4 Choose the correct Answer Answer 1 An error which says incorrect syntax near - Answer 2 7 Answer 3 -1 Answer 4 None of the above
I am starting this series of questions which will be posted every month. You may find them interesting to answer. This is the question for this month. What does SQL Server return for the following select statement? SELECT 7A Post your answer and breifly explain the output. Keep following this series...