-
Is this a bug in SQL
I have found something, i don't know if it is a bug or what? please review the sql below. (i found this in running project but to simplify it i have created similar example tables and query)
create table tbl1 ( id1 int identity(1,1) primary key, data1 int )
create table tbl2 ( id int identity(1,1) primary key, id1 int, data2 int )
select * from tbl1 where id1 in (select data1 from tbl2)
why above sql statement does not gives error?
-
Re: Is this a bug in SQL
why that should through error ?
-
Re: Is this a bug in SQL
[I]In the select statement you have given in braces had mentioned data1 as column name, but the column name in tbl2 is data2. So the error message would have thrown definitely.[/I]