Re: SET ANSI_NULLS OFF

From: Uri Dimant (urid_at_iscar.co.il)
Date: 10/14/04


Date: Thu, 14 Oct 2004 12:56:45 +0200

Hi
What would you expect to get back?
Read SET ANSI_NULLS article (with many examples ) in the BOL

"ggeshev" <ggeshev@tonegan.bg> wrote in message
news:%23OyoYtdsEHA.2664@TK2MSFTNGP12.phx.gbl...
> Hello !
>
> I've got two tables :
>
> create table T1 (
> a int primary key not null,
> b int
> )
>
> go
>
>
> create table T2 (
> a int primary key not null,
> b int
> )
>
> go
>
>
> insert into t1 values (1, null)
> insert into t2 values (2, null)
>
>
> Why the following query does not return anything?
>
>
> set ansi_nulls off
> go
>
> select t1.a, t2.a
> from t1
> inner join t2
> on t1.b = t2.b
>
>
> Thank you!
>
>



Relevant Pages

  • Re: Non-Relating Join Criteria
    ... CREATE TABLE a (APK int PRIMARY KEY, SEL int, ... ... FROM a INNER JOIN b ... when you install the client tools). ... With outer joins, however, different results can be obtained depending on ...
    (comp.databases.ms-sqlserver)
  • Re: Select from 4 tables with COUNT(*)
    ... I only updated the IPs table to include a device varchar ... INNER JOIN dbo.Networks n ... Company_ID INT PRIMARY KEY, ... Company_Name VARCHARNOT NULL DEFAULT 'unknown', ...
    (microsoft.public.sqlserver.programming)
  • Re: subquery problem, wrong reference in the subquery?
    ... Columnist, SQL Server Professional ... The query still runs and give out results. ... create table t2 (rowid int primary key, rowname varchar(100)) ...
    (microsoft.public.sqlserver.programming)
  • Non-Relating Join Criteria
    ... Transact SQL apparently supports one-sided critera, ... CREATE TABLE a (APK int PRIMARY KEY, SEL int, ... ... FROM a INNER JOIN b ...
    (comp.databases.ms-sqlserver)