Getting error on saving edited table straucture

  • I have created one table 'QuesDetails'.

    I had to change the field so I opened the table in design view.

    I changed one field UNID-as varchar [6] and UniqueId as Numeric[9].

    When I am trying to save this, it gives me error.

    'QuesDeatils (rose39)' table

    - Warning: The table was created with ANSI_NULLS 'off' and will be re-created with ANSI_NULLS 'on'.

    Is there any wrong in edited table structure.

    What is meaning of above error..

    Can anyone explain me....

    Regards

    Jafar

  • Here is the explaination:

    You have created table as below.

    SET ANSI_NULLS OFF

    GO

    CREATE TABLE [ZZZ_employee] (

    [emp_id] int NOT NULL ,

    [fname] [varchar] (20) NULL ,

    )

    GO

    Lets put same data

    insert into [ZZZ_employee] values (1, null)

    Now lets check the difference..

    SET ANSI_NULLS OFF

    go

    select * from [ZZZ_employee]

    where fname = null

    -- It would return 1 row

    go

    SET ANSI_NULLS ON

    go

    select * from [ZZZ_employee]

    where fname = null

    -- It would return 0 row

    go

    If you modify the table SQL is giving you warning to let you know that query's result will be modified if you create the table.

    If you really want to have similar table, you need to drop and recreate the table with proper setting.

    If you have compared it with "IS NULL" then it would be fine.

    Hope this helps

    -B

  • I didnt get meaning of 'with proper setting'.

    Can u explain in brief.

    I have to create table wich allow NULL search.

    Total fields(colom) in a table is 1024 & nearly 1010 fields having 255 length.

    Regards

    Majid

  • What is default setting for this.

    I mean is it 'ANSI NULL OFF' or 'ON'

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply