|
Home > Archive > SQL Anywhere database > December 2005 > NULL
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Luis Telles 2005-12-21, 1:23 pm |
| Hi friends, i am using ASA9 and i am creating a table frin isql:
create table test
( campoa char(1) not null,
campob char(1) )
the filed campob has not null, i want the default null....
What's the solution for create null values...?
| |
| Luis Telles 2005-12-21, 8:24 pm |
| ASA Database Administration Guide
Database Options
Alphabetical list of options
ALLOW_NULLS_BY_DEFAU
LT option [compatibility]
--------------------------------------------------------------------------------
Function
Controls whether new columns that are created without specifying either NULL
or NOT NULL are allowed to contain NULL values.
Allowed values
ON, OFF
Default
ON
OFF for Open Client and JDBC connections
Description
The ALLOW_NULLS_BY_DEFAU
LT option is included for Transact-SQL
compatibility.
For more information, see Setting options for Transact-SQL compatibility.
"Luis Telles" <ltelles@adisof.com> escribió en el mensaje
news:43a9ab75@forums
-2-dub...
> Hi friends, i am using ASA9 and i am creating a table frin isql:
>
> create table test
> ( campoa char(1) not null,
> campob char(1) )
>
> the filed campob has not null, i want the default null....
> What's the solution for create null values...?
>
>
>
>
| |
| Glenn Paulley 2005-12-22, 9:23 am |
| It's true that this option does exist, though it is intended to assist
only with the porting of Transact-SQL applications because the default in
Sybase ASE is the opposite of the default in SQL Anywhere.
That said, however, I would strong recommend that you not rely on this
option setting, but rather make nullability of each column explicit - it
can significantly reduce the potential for confusion (and error).
Glenn
"Luis Telles" <ltelles@adisof.com> wrote in news:43a9b3e4@forums
-2-dub:
> ASA Database Administration Guide
>
> Database Options
>
> Alphabetical list of options
>
> ALLOW_NULLS_BY_DEFAU
LT option [compatibility]
>
> -----------------------------------------------------------------------
> ---------
>
> Function
> Controls whether new columns that are created without specifying
> either NULL or NOT NULL are allowed to contain NULL values.
>
> Allowed values
> ON, OFF
>
> Default
> ON
>
> OFF for Open Client and JDBC connections
>
> Description
> The ALLOW_NULLS_BY_DEFAU
LT option is included for Transact-SQL
> compatibility.
>
> For more information, see Setting options for Transact-SQL
> compatibility.
>
> "Luis Telles" <ltelles@adisof.com> escribió en el mensaje
> news:43a9ab75@forums
-2-dub...
>
>
>
--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering
EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all
To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm
SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288
| |
| Luis Telles 2005-12-22, 11:23 am |
| OK, What`s the confusion or possible error...?
Thanks
Luis Telles
"Glenn Paulley" <paulley@ianywhere.com> escribió en el mensaje
news:Xns973463C8E1F6
1paulleyianywherecom
@10.22.241.106...
> It's true that this option does exist, though it is intended to assist
> only with the porting of Transact-SQL applications because the default in
> Sybase ASE is the opposite of the default in SQL Anywhere.
>
> That said, however, I would strong recommend that you not rely on this
> option setting, but rather make nullability of each column explicit - it
> can significantly reduce the potential for confusion (and error).
>
> Glenn
>
> "Luis Telles" <ltelles@adisof.com> wrote in news:43a9b3e4@forums
-2-dub:
>
>
>
>
> --
> Glenn Paulley
> Research and Development Manager, Query Processing
> iAnywhere Solutions Engineering
>
> EBF's and Patches: http://downloads.sybase.com
> choose SQL Anywhere Studio >> change 'time frame' to all
>
> To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm
>
> SQL Anywhere Studio Supported Platforms and Support Status
> http://my.sybase.com/detail?id=1002288
| |
| Glenn Paulley 2005-12-22, 8:24 pm |
| The potential for error is simply that from looking at the CREATE TABLE
statement alone, you cannot tell if the column permits null values or not
- it will depend on the setting of the option at *run time* when the
CREATE TABLE statement is executed. Another cause for potential problems
is in porting your application to another DBMS should that ever be
necessary, since other systems may have the opposite default (as is the
case between SQL Anywhere and ASE or MS SQL Server).
In such cases it is easy to miss test scenarios that exclude NULL values,
but when the application is in operation (particularly when it is
deployed) the insertion of NULL values in any column may fail. We have
seen other customers in the past being burned by relying on the default
option setting.
Glenn
"Luis Telles" <ltelles@adisof.com> wrote in
news:43aadc66$1@foru
ms-1-dub:
> OK, What`s the confusion or possible error...?
>
> Thanks
>
> Luis Telles
>
>
> "Glenn Paulley" <paulley@ianywhere.com> escribió en el mensaje
> news:Xns973463C8E1F6
1paulleyianywherecom
@10.22.241.106...
>
>
--
Glenn Paulley
Research and Development Manager, Query Processing
iAnywhere Solutions Engineering
EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all
To Submit Bug Reports: http://casexpress.sybase.com/cx/cx.stm
SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288
|
|
|
|
|