At 01:12 AM 9/10/2006 +0330, Behrang Saeedzadeh wrote:
Hi,
Shouldn't this create statement trigger an error?
create table bar (col1 int not null default null);
No.
Shouldn't I be forbidden to insert null values into a non null column?
Yes.
Use "not null default null" when you want to f
If there is no default statement, then the default (by default) is null.
What you are suggesting is that every field that is not null should
require a default value.
Behrang Saeedzadeh wrote:
Stephan,
But "not null" is in contradiction with "default null" so the create
statement should not pr
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Behrang Saeedzadeh wrote:
> Stephan,
>
> But "not null" is in contradiction with "default null" so the create
> statement should not proceed successfuly IMHO.
I see your point, but those are run-time (i.e. DML) operations, not
DDL statements. Added
"Behrang Saeedzadeh" <[EMAIL PROTECTED]> writes:
> Actually I read in a blog that this works in PostgreSQL (the author
> expected this) and not in MySQL. But to me, the way MySQL is handling
> this looks more reasonable.
MySQL's way of doing things is seldom reasonable. In the example
given, they
Hi,
Actually I read in a blog that this works in PostgreSQL (the author
expected this) and not in MySQL. But to me, the way MySQL is handling
this looks more reasonable.
You may want to read the blog here:
http://www.redhillconsulting.com.au/blogs/simon/archives/000347.html
Regards,
Behi
On 9/
Stephan,
But "not null" is in contradiction with "default null" so the create
statement should not proceed successfuly IMHO.
Regards,
Behi
On 9/10/06, Stephan Szabo <[EMAIL PROTECTED]> wrote:
On Sun, 10 Sep 2006, Behrang Saeedzadeh wrote:
> Shouldn't this create statement trigger an error?
>
On Sun, 10 Sep 2006, Behrang Saeedzadeh wrote:
> But "not null" is in contradiction with "default null" so the create
> statement should not proceed successfuly IMHO.
The fact that the default value isn't going to pass a constraint means
that it's invalid to not provide a value or use default, y
Stephan Szabo <[EMAIL PROTECTED]> writes:
> On Sun, 10 Sep 2006, Behrang Saeedzadeh wrote:
>> Shouldn't this create statement trigger an error?
>> create table bar (col1 int not null default null);
> I think it should forbid it when the default actually comes into play like
> on insert or update,
On Sun, 10 Sep 2006, Behrang Saeedzadeh wrote:
> Shouldn't this create statement trigger an error?
>
> create table bar (col1 int not null default null);
>
> Shouldn't I be forbidden to insert null values into a non null column?
I think it should forbid it when the default actually comes into p
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Behrang Saeedzadeh wrote:
> Hi,
>
> Shouldn't this create statement trigger an error?
>
> create table bar (col1 int not null default null);
>
> Shouldn't I be forbidden to insert null values into a non null column?
What happens when you actually
Hi,
Shouldn't this create statement trigger an error?
create table bar (col1 int not null default null);
Shouldn't I be forbidden to insert null values into a non null column?
Regards,
Behi
--
"We can only see a short distance ahead,
but we can see plenty there
that needs to be done." - Alan
11 matches
Mail list logo