Re: Setting DEFAULT to empty string using SQL
- From: "Tomas Eklund" <eklund.tomas@xxxxxxxxx>
- Date: Sat, 15 Jul 2006 00:47:55 +0200
Have you tried using NULL? Otherwise just create the table with
'UNKNOWN'contained in all of the records for the last column, then
update the table with either NULL or an empty string.
Yes, I decided I didn't want to use NULLs in this case (actually I'm
declaring the fields with NOT NULL). And having a default value that is
something other than an empty string will not make any sense in this case.
Then it's better to not have any default value at all, and make sure to
always specify a value (valid or empty) when inserting rows.
I just thought it would be utterly stupid if it wasn't possible to have
empty strings as default values (I know it's possible to create such
tables using the Access user interface). But then again, it is SQL and SQL
must be the most stupid and inconsistent language ever created.
Best regards
Tomas Eklund
.
- References:
- Setting DEFAULT to empty string using SQL
- From: Tomas Eklund
- Setting DEFAULT to empty string using SQL
- Prev by Date: Re: my employee listing
- Next by Date: Re: Query for all recs Between 7/10 at 2:PM and 7/12 at 6 PM ???
- Previous by thread: Setting DEFAULT to empty string using SQL
- Next by thread: Create INSERT SQL statements
- Index(es):
Relevant Pages
|
|