Re: modify default value

2007-09-15 Thread Baron Schwartz
Baron Bernd Jagla wrote: Hi, I am mass-importing A LOT of csv tables. In order to distinguish between files I change the default value for the table before doing a "load data infile.." from a Perl script: ALTER TABLE `data` MODIFY COLUMN `sample_id` INTEGER UNSIGNED NOT NUL

modify default value

2007-09-15 Thread Bernd Jagla
Hi, I am mass-importing A LOT of csv tables. In order to distinguish between files I change the default value for the table before doing a "load data infile.." from a Perl script: ALTER TABLE `data` MODIFY COLUMN `sample_id` INTEGER UNSIGNED NOT NULL DEFAULT $sample_id[$idx]

Re: Setting a field to NULL (default value)

2007-04-16 Thread Tim Johnson
On Monday 16 April 2007 07:56, Tim Johnson wrote: > Hi: > I have a table with a column of type char(120). > default is NULL > How do I a set a 'cell' back to NULL? > Example: > alter customers set all_colslist=NULL where ID=57; > returns a syntax error. > Mysql version 4.0.20 > thanks This is embar

Setting a field to NULL (default value)

2007-04-16 Thread Tim Johnson
Hi: I have a table with a column of type char(120). default is NULL How do I a set a 'cell' back to NULL? Example: alter customers set all_colslist=NULL where ID=57; returns a syntax error. Mysql version 4.0.20 thanks -- Tim Johnson <[EMAIL PROTECTED]> Palmer, Alaska, USA -- MySQL General Mailin

Re: Default Value to a DateTime Column

2007-03-13 Thread Steve Edberg
At 9:30 PM -0300 3/13/07, allysonalves wrote: Hi everybody Has some way to set up a function, like now(), as a default value of an dateTime column. Is some thing like this. Create Table Persons ( PersonCode int(10) zerofill not null auto_increment, PersonName varchar(150) not null

Default Value to a DateTime Column

2007-03-13 Thread allysonalves
Hi everybody Has some way to set up a function, like now(), as a default value of an dateTime column. Is some thing like this. Create Table Persons ( PersonCode int(10) zerofill not null auto_increment, PersonName varchar(150) not null, CadastreDate DateTime not null default now(), Primary Key

Re: MySQL 5.0.2 Default Value

2005-03-09 Thread Paul DuBois
s defining the default values. Will I have to re-create the default values if my database becomes corrupted? The statement you quote applies in the absence of an explicit DEFAULT clause that specifies the default value. I don't know what it means to back up a default value or re-create them,

MySQL 5.0.2 Default Value

2005-03-09 Thread Jason L. McAffee
The MySQL manual states that as of MySQL 5.0.2 "If the column cannot take NOT NULL as the value, MySQL defines the column with no explicit DEFAULT clause." How are the default values then backed-up? I did not see any statements defining the default values. Will I have to re-create the

Re: Revert a column to its default value

2004-10-22 Thread Egor Egorov
Jonathan Kart <[EMAIL PROTECTED]> wrote: > > Hi all, > > > Is it possible in mysql 3.23 to update a row and revert a column back > to its default value. Not the default value for the type, but the > value defined as the column default. [] > UPDATE pic

Revert a column to its default value

2004-10-20 Thread Jonathan Kart
Hi all, Is it possible in mysql 3.23 to update a row and revert a column back to its default value. Not the default value for the type, but the value defined as the column default. for example a column is defined as : picture_name VARCHAR(25) NOT NULL DEFAULT 'no_photo.gif' if someo

Re: Specifying an index length and the default value

2004-05-30 Thread David Griffiths
riginal Message - From: "David Griffiths" Sent: Friday, May 28, 2004 6:05 PM Subject: Specifying an index length and the default value The length of indexes on varchar and char indexes can be specified at index creation. What is the default length of an index if no length is provided?

Re: Specifying an index length and the default value

2004-05-30 Thread Matt W
Hi David, Great questions: - Original Message - From: "David Griffiths" Sent: Friday, May 28, 2004 6:05 PM Subject: Specifying an index length and the default value > The length of indexes on varchar and char indexes can be specified at > index creation. > > What

Specifying an index length and the default value

2004-05-28 Thread David Griffiths
The length of indexes on varchar and char indexes can be specified at index creation. What is the default length of an index if no length is provided? The High Performance MySQL book hints that the index-length used is specific for each entry in the indexed column (ie an index on a column where

Re: setting default value based on another field value

2004-05-18 Thread Paul DuBois
At 18:07 +0100 5/18/04, James Tusini wrote: I was wondering if there's a way to set a field to be a pattern of another field in the same table, ie: numberfile 1 xyz_1.jpg 2 xyz_2.jpg 3 xyz_3.jpg . . nxyz_n.jpg I'm achieving this through php but wa

Re: setting default value based on another field value

2004-05-18 Thread Egor Egorov
James Tusini <[EMAIL PROTECTED]> wrote: > I was wondering if there's a way to set a field to be a pattern of another > field in the same table, ie: > > numberfile > 1 xyz_1.jpg > 2 xyz_2.jpg > 3 xyz_3.jpg > . > . > nxyz_n.jpg > > > I'm ach

setting default value based on another field value

2004-05-18 Thread James Tusini
I was wondering if there's a way to set a field to be a pattern of another field in the same table, ie: numberfile 1 xyz_1.jpg 2 xyz_2.jpg 3 xyz_3.jpg . . nxyz_n.jpg I'm achieving this through php but was curious to know if you could do it

Re: Problem setting default value for column with concat()

2004-05-06 Thread gerald_clark
Tim Russell wrote: Hi all, When I run the following code the default value isn't being calculated using the concat and other functions. Instead it is setting the column definition as a string: CONCAT("TMP How can I rework this to get a result more like TMP-T-2 ? You can&

Problem setting default value for column with concat()

2004-05-06 Thread Tim Russell
Hi all, When I run the following code the default value isn't being calculated using the concat and other functions. Instead it is setting the column definition as a string: CONCAT("TMP How can I rework this to get a result more like TMP-T-2 ? USE cro; CREATE TABL

Re: Datetime Default Value

2004-04-19 Thread Paul DuBois
At 20:23 -0400 4/19/04, Stormblade wrote: On Mon, 19 Apr 2004 17:36:50 -0500, Paul DuBois wrote: Sorry if I wasn't clear. One of the things you wanted to do was have a column that is set automatically to record-creation time when the record is created, but not updated automatically when the re

Re: Datetime Default Value

2004-04-19 Thread Stormblade
On Mon, 19 Apr 2004 17:36:50 -0500, Paul DuBois wrote: > Sorry if I wasn't clear. One of the things you wanted to do was have > a column that is set automatically to record-creation time when the > record is created, but not updated automatically when the record is > updated later. You will be

Re: Datetime Default Value

2004-04-19 Thread Paul DuBois
er to MySQL. I have a web application that currently uses SQLServer but will be using MySQL soon as I can get this done. I was able to match data types but so far I have not found a way to let the database handle setting the default value of a datetime field to the current date/time. Is

Re: Datetime Default Value

2004-04-19 Thread Stormblade
7;m currently converting a SQLServer 2000 database over to MySQL. I have a >>>> web application that currently uses SQLServer but will be using MySQL soon >>>> as I can get this done. >>>> >>>> I was able to match data types but so far I have not found a

Re: Datetime Default Value

2004-04-19 Thread Paul DuBois
n get this done. I was able to match data types but so far I have not found a way to let the database handle setting the default value of a datetime field to the current date/time. Is this possible? Defaults must be constants, not functions, in MySQL. So, except for the TIMESTAMP type, the a

Re: Datetime Default Value

2004-04-19 Thread Paul DuBois
n get this done. I was able to match data types but so far I have not found a way to let the database handle setting the default value of a datetime field to the current date/time. Is this possible? Defaults must be constants, not functions, in MySQL. So, except for the TIMESTAMP type, the a

Re: Datetime Default Value

2004-04-18 Thread Stormblade
r time, not client time. Goodness! > > But, you need to know that MySQL behaves differently than you expect with > respect to NOT NULL columns. Because it supports non-transactional table > types, every column in MySQL has a default value, even NOT NULL columns. Not Goodness. :(

Re: Datetime Default Value

2004-04-18 Thread Stormblade
On Sun, 18 Apr 2004 13:54:22 -0400, Rhino wrote: > Stormblade (and anyone watching this thread), > > Just watch yourself when deciding between DATETIME and TIMESTAMP; the two > datatypes support very different ranges of values! Thanks for the heads up! > > According to the manual, DATETIME can

Re: Datetime Default Value

2004-04-18 Thread Michael Stassen
le to match data types but so far I have not found a way to let the database handle setting the default value of a datetime field to the current date/time. Is this possible? Defaults must be constants, not functions, in MySQL. So, except for the TIMESTAMP type, the answer is no. I suspected as mu

Re: Datetime Default Value

2004-04-18 Thread Rhino
t what values you'll have to store before you make a final choice of the datatype. Rhino - Original Message - From: "Stormblade" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 18, 2004 1:30 PM Subject: Re: Datetime Default Value > On Sun

Re: Datetime Default Value

2004-04-18 Thread Stormblade
> as I can get this done. >> >> I was able to match data types but so far I have not found a way to let the >> database handle setting the default value of a datetime field to the >> current date/time. Is this possible? > > Defaults must be constants, not functions

Re: Datetime Default Value

2004-04-18 Thread Michael Stassen
andle setting the default value of a datetime field to the current date/time. Is this possible? Defaults must be constants, not functions, in MySQL. So, except for the TIMESTAMP type, the answer is no. In my research I found 2 main suggestions: 1. Use timestamp. While this suggestion is good f

Re: Datetime Default Value - I want to know too!

2004-04-18 Thread Stormblade
the same database? With SQLServer this isn't a problem. Currently with MySQL it is. Although I hear that verion 5 will support stored procedures. Perhaps that will be a workaround for that situation, although it would be much nicer IMO to simply allow us to specify a function/macro for a default

Re: Datetime Default Value - I want to know too!

2004-04-18 Thread Adam
etting the default value of a datetime field to the current date/time. Is this possible? In my research I found 2 main suggestions: 1. Use timestamp. While this suggestion is good for my modified fields it is not really suitable for the others which basically will get set once and that's it.

Datetime Default Value

2004-04-17 Thread Stormblade
Hey all, I'm currently converting a SQLServer 2000 database over to MySQL. I have a web application that currently uses SQLServer but will be using MySQL soon as I can get this done. I was able to match data types but so far I have not found a way to let the database handle setting the de

RE: [Mysql-discussions] HOW TO RUN SQL and default value ?

2004-02-09 Thread Remko Lodder
mysql -p -u -e that can be runned from any shell script. use enum to check Y/N TRUE/FALSE etc. CREATE TABLE testtest ( test ENUM( 'TRUE', 'FALSE' ) NOT NULL ); it automaticly sets true as default value with me. otherwise add: DEFAULT 'FALSE' after not

HOW TO RUN SQL and default value ?

2004-02-09 Thread Seena Blace
Hi, How to run script at mysql prompt? Like if i want to create a table or select some query and I want to put those sql statement into one file ,how to run that and what would be the extention of that query? I want to create on column which contains only default value TRUE or False.how to do

Re: Alter table and setup Default value

2004-01-03 Thread robert_rowe
This worked for me: ALTER TABLE `test` CHANGE `somefield` `somefield` enum('new','used') DEFAULT 'new' -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Alter table and setup Default value

2004-01-03 Thread Matt W
Hi Mike, It's just part of modifying the column to change the DEFAULT value. e.g. you might use this (changes to NOT NULL and DEFAULT value of 'new'): ALTER TABLE table MODIFY type ENUM('new','used') NOT NULL DEFAULT 'new'; Hope that helps. Ma

Alter table and setup Default value

2004-01-03 Thread Mike Mapsnac
I use MYSQL 4. I can modify or alter a column with no problems. But how I can alter table and setup Default value. The column below has default value NULL, but I want to setup default value used. How that's can be done? type | enum('new',used')

How can a dataset return the default value from the database(MySQL,MSSQL, Interbase).

2003-11-06 Thread sowee
Hello ALL How can a dataset return the default value from the database(MySQL,MSSQL, Interbase). I have try in ADO, dbx, BDE, and the result is not, How Can I do? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

Re: How to update/set a default value for field via delete statement

2003-09-22 Thread Victoria Reznichenko
"Daevid Vincent" <[EMAIL PROTECTED]> wrote: > I have my schema set so that a field in a table has a default value of 16. > > I also have a script that "initializes" the database, but I don't want to > delete the record since I want the other fields&#x

How to update/set a default value for field via delete statement

2003-09-21 Thread Daevid Vincent
I have my schema set so that a field in a table has a default value of 16. I also have a script that "initializes" the database, but I don't want to delete the record since I want the other fields' data preserved. Is there a way to find out what the default schema value is so

When to use NULL as default value

2003-08-21 Thread Charles Kline
Hi all, I pretty much set a fields default value to NULL if it not a "required" field in my app. Just wondering if this is the way to go since I just sort of guessed at this method ;) - Charles -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To u

Re: column default value

2003-07-16 Thread Paul DuBois
At 9:02 -0800 7/16/03, Tim Johnson wrote: Hello: I'm using version 3.23.41. How may I change the default value of an existing table? (type will remain the same) Pointers to docs are welcome and invited. thanks tim -- Tim Johnson <[EMAIL PROTECTED]>

column default value

2003-07-16 Thread Tim Johnson
Hello: I'm using version 3.23.41. How may I change the default value of an existing table? (type will remain the same) Pointers to docs are welcome and invited. thanks tim -- Tim Johnson <[EMAIL PROTECTED]> http://www.alaska-internet-solutions.com

Re: default value does not set using LOAD DATA INFILE ...

2003-06-25 Thread Roman Neuhauser
this way, which screws threading in mail clients that can do such thing. > > # [EMAIL PROTECTED] / 2003-06-24 09:46:24 +1000: > > > I am using LOAD DATA INFILE to import some data to MySQL. I would > > > like to leave some fields blank and use the default value set in > >

Re: default value does not set using LOAD DATA INFILE ...

2003-06-24 Thread Ruth Zhai
riginal Message - From: "Roman Neuhauser" <[EMAIL PROTECTED]> To: "Ruth Zhai" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, June 24, 2003 7:50 PM Subject: Re: default value does not set using LOAD DATA INFILE ... > please don't pigg

Re: default value does not set using LOAD DATA INFILE ...

2003-06-24 Thread Roman Neuhauser
please don't piggyback on other people's threads. you can start your own for free. # [EMAIL PROTECTED] / 2003-06-24 09:46:24 +1000: > I am using LOAD DATA INFILE to import some data to MySQL. I would like to > leave some fields blank and use the default value set in the

default value does not set using LOAD DATA INFILE ...

2003-06-23 Thread Ruth Zhai
Hi Everyone, I am using LOAD DATA INFILE to import some data to MySQL. I would like to leave some fields blank and use the default value set in the tables. I have spent many hours trying to find the problem, but no luck so far. According to the manual, it should work. I am hoping some one on

Re: Help With Default Value

2003-03-31 Thread gerald_clark
ot;MySQL List" <[EMAIL PROTECTED]> To: "Bhavin Vyas" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 9:44 PM Subject: Re: Help With Default Value Ok, how do I get the MAX(id)? Thanks, Richard - Original Message - From: "Bhavin

Re: Help With Default Value

2003-03-30 Thread MySQL List
March 30, 2003 9:44 PM Subject: Re: Help With Default Value > Ok, how do I get the MAX(id)? > > Thanks, > Richard > > > - Original Message - > From: "Bhavin Vyas" <[EMAIL PROTECTED]> > To: "MySQL List" <[EMAIL PROTECTED]>

Re: Help With Default Value

2003-03-30 Thread MySQL List
Ok, how do I get the MAX(id)? Thanks, Richard - Original Message - From: "Bhavin Vyas" <[EMAIL PROTECTED]> To: "MySQL List" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 7:59 PM Subject: Re: Help With Default Value >

Re: Help With Default Value

2003-03-30 Thread Bhavin Vyas
D]> Sent: Sunday, March 30, 2003 7:23 PM Subject: Help With Default Value I am trying to do one of two things. First I'd rather do this, but if not possible, then the other way that I'll describe will suffice. 1) I need to have a default value of a column named "invoice_id&qu

Help With Default Value

2003-03-30 Thread MySQL List
I am trying to do one of two things. First I'd rather do this, but if not possible, then the other way that I'll describe will suffice. 1) I need to have a default value of a column named "invoice_id" be this: Column names of importance: idinvoice_id id is auto_increment

Re: Feature request: using CURRENT_DATE as DEFAULT value

2003-03-06 Thread gerald_clark
Perhaps TIMESTAMP will provide what you need. Daevid Vincent wrote: http://www.mysql.com/doc/en/CREATE_TABLE.html states "Default values must be constants. This means, for example, that you cannot set the default for a date column to be the value of a function such as NOW() or CURRENT_DATE." Is t

Re: Feature request: using CURRENT_DATE as DEFAULT value

2003-03-05 Thread Paul DuBois
At 17:56 -0800 3/5/03, Daevid Vincent wrote: http://www.mysql.com/doc/en/CREATE_TABLE.html states "Default values must be constants. This means, for example, that you cannot set the default for a date column to be the value of a function such as NOW() or CURRENT_DATE." Is this ever going to be "fix

Feature request: using CURRENT_DATE as DEFAULT value

2003-03-05 Thread Daevid Vincent
http://www.mysql.com/doc/en/CREATE_TABLE.html states "Default values must be constants. This means, for example, that you cannot set the default for a date column to be the value of a function such as NOW() or CURRENT_DATE." Is this ever going to be "fixed"? I often find myself using this when cre

Re: conditional default value

2003-02-15 Thread Stefan Hinz
Tim, > I am importing text data (but in a numeric format). > The customers wants 'N/A' in an empty field. > Additionally: > The customer wishes that if a field = '9999' > the default value of 'N/A' be substituted. > Is this possible to do

Re: conditional default value

2003-02-15 Thread Paul DuBois
if a field = '' the default value of 'N/A' be substituted. Is this possible to do in MySQL? Sure, but not with LOAD DATA. You can either preprocess the data file beforehand, or do this after import: UPDATE TABLE t SET col = 'N/A' IF col = '' OR col =

conditional default value

2003-02-15 Thread Tim Johnson
Hello All: (using MYSQL Ver 11.15 Distrib 3.23.41 for redhat-linux-gnu (i386) (RH 7.2)) I am importing text data (but in a numeric format). The customers wants 'N/A' in an empty field. Additionally: The customer wishes that if a field = '' the defau

re: Can I set a default value to a function?

2003-01-28 Thread Egor Egorov
On Tuesday 28 January 2003 05:04, Carlin Anderson wrote: > I am running mysql 3.23, and want to know if I can set the default value > of a column to to_days(now()), or the equivelant. I have tried this, > and the default gets translated to 0. Nope. Default column value must be

Re: Can I set a default value to a function?

2003-01-28 Thread Jeremy Zawodny
On Mon, Jan 27, 2003 at 10:04:07PM -0500, Carlin Anderson wrote: > I am running mysql 3.23, and want to know if I can set the default value > of a column to to_days(now()), or the equivelant. I have tried this, > and the default gets translated to 0. You cannot. -- Jeremy D. Zawodny

Can I set a default value to a function?

2003-01-27 Thread Carlin Anderson
I am running mysql 3.23, and want to know if I can set the default value of a column to to_days(now()), or the equivelant. I have tried this, and the default gets translated to 0. Thanks Carlin - Before posting, please check

re: function as default value

2002-09-30 Thread Egor Egorov
Daya, Friday, September 28, 2001, 10:36:30 AM, you wrote: DKD> Can anybody tell me is it possible in the my sql to set the function as DKD> default value, for example can i set the now() function for the date column DKD> field. No, you can't: http://www.mysql.com/doc/en/CRE

function as default value

2002-09-30 Thread Daya Krishan Dubey
Hi, Can anybody tell me is it possible in the my sql to set the function as default value, for example can i set the now() function for the date column field. Thanks in advance. Regards Daya Krishan Dubey Core Solucomm Ltd 423 B, Hamilton court DLF phase IV Gurgaon, India Ph# 91-124-6392896/7

Re: date field - default value = current date

2002-09-18 Thread Paul DuBois
At 1:32 -0700 9/18/02, neal wrote: >Is there a wat to have mySQL auto fill in the current date into my >dateCreated field? > >In SQLServer I would simply specify the getDate() method as a default value. >I presume I would use the analogous MySQL function curDate() but it does not

re: date field - default value = current date

2002-09-18 Thread Egor Egorov
neal, Wednesday, September 18, 2002, 11:32:39 AM, you wrote: n> Is there a wat to have mySQL auto fill in the current date into my n> dateCreated field? n> In SQLServer I would simply specify the getDate() method as a default value. n> I presume I would use the analogous MySQL func

Re: date field - default value = current date

2002-09-18 Thread Mikhail Entaltsev
Check TIMESTAMP type in the documentation. Best regards, Mikhail. - Original Message - From: "neal" <[EMAIL PROTECTED]> To: "mySQL" <[EMAIL PROTECTED]> Sent: Wednesday, September 18, 2002 10:32 AM Subject: date field - default value = current date >

date field - default value = current date

2002-09-18 Thread neal
Is there a wat to have mySQL auto fill in the current date into my dateCreated field? In SQLServer I would simply specify the getDate() method as a default value. I presume I would use the analogous MySQL function curDate() but it does not appear to work for me. Any suggestions

Re: default value

2002-03-20 Thread denonymous
From: "Michal Dvoracek" <[EMAIL PROTECTED]> > s possible to create table with default value returned by built-in > function ?? > like: > > create table x (a int not null default UNIX_TIMESTAMP()); > > When inserting new column in table field a will contains

Re: default value

2002-03-20 Thread Gerald Clark
Michal Dvoracek wrote: >Hello, > >s possible to create table with default value returned by built-in >function ?? >like: > No. > >create table x (a int not null default UNIX_TIMESTAMP()); > What is wrong with the timestamp field type? > > >When insert

default value

2002-03-20 Thread Michal Dvoracek
Hello, s possible to create table with default value returned by built-in function ?? like: create table x (a int not null default UNIX_TIMESTAMP()); When inserting new column in table field a will contains timestamp? sql,query Regards, Michal Dvoracek [EMAIL

Re: Default value support function

2002-03-18 Thread Jeremy Zawodny
On Mon, Mar 18, 2002 at 05:32:07PM -0500, Kathy Reyes wrote: > Can I have a default value call a function in a MYSQL table for example > > convert(float,getdate()) Nope. -- Jeremy D. Zawodny, <[EMAIL PROTECTED]> Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408)

Default value support function

2002-03-18 Thread Kathy Reyes
Can I have a default value call a function in a MYSQL table for example convert(float,getdate()) Kathy Reyes Live Technology International 2975 Westchester Avenue Suite 103 Purchase, NY 10577 Tel: (914) 490-7096 [EMAIL PROTECTED] www.LiveTechnology.com

RE: Setting a DEFAULT value

2001-11-04 Thread Chris Book
I suggest a few things. First, set it to NOT NULL DEFAULT 1, and then set the value explicitly to null, which will cause it to use the default value. The problem with inserting '' is that its casting to an integer and mysql decides that '' should be 0. Or try using : insert

Re: Setting a DEFAULT value

2001-11-04 Thread Steve Meyers
On Sun, 2001-11-04 at 13:52, Chris Williams wrote: > I'm trying to create at table that inserts a default value into a field if > nothing is supplied. If in interpret the documentation correctly this should > be accomplished by something like this: > > CREATE TABLE Location

Setting a DEFAULT value

2001-11-04 Thread Chris Williams
I'm trying to create at table that inserts a default value into a field if nothing is supplied. If in interpret the documentation correctly this should be accomplished by something like this: CREATE TABLE Location (LocationID VARCHAR(10) NOT NULL PRIMARY KEY, Name VARCHAR(50), Address1 VA

Re: ENUM NOT NULL without default value

2001-09-30 Thread Paul DuBois
At 2:43 AM +0100 10/1/01, Corin Hartland-Swann wrote: >Hi Monty, > >I've been experimenting with ENUM NOT NULL columns without a default >value. The documentation (section 6.5.3 again) states: > >"If no DEFAULT value is specified for a column, MySQL automatically >

ENUM NOT NULL without default value

2001-09-30 Thread Corin Hartland-Swann
Hi Monty, I've been experimenting with ENUM NOT NULL columns without a default value. The documentation (section 6.5.3 again) states: "If no DEFAULT value is specified for a column, MySQL automatically assigns one. If the column may take NULL as a value, the default value is NU

Error: 'Invalid default value for enum_field'

2001-06-20 Thread Denis Simard
Hi, When I try to give a default value in an enum field with a string containing extented ascii value (i.e. higher than 128), I get an 'Invalid default value for enum_field' error. For instance, the command: alter table MyTable add AnEnumField enum('Employ

Re: Setting a specific default value on a field

2001-03-13 Thread Vivek Khera
>>>>> "JSB" == Jamie S Buchanan <[EMAIL PROTECTED]> writes: JSB> More specifically, I have two DateTime fields (A and B), in my creation JSB> script I want to set the default value of B to the value of A so that JSB> when I write a new record to the tab

Re: Setting a specific default value on a field

2001-03-09 Thread Gerald L. Clark
be set to a value of another DateTime field? > > More specifically, I have two DateTime fields (A and B), in my creation > script I want to set the default value of B to the value of A so that > when I write a new record to the table the position of B can be left > NULL, or equivalent, but

Re: Setting a specific default value on a field

2001-03-09 Thread Peter Skipworth
d > to intially be set to a value of another DateTime field? > > More specifically, I have two DateTime fields (A and B), in my creation > script I want to set the default value of B to the value of A so that > when I write a new record to the table the position of B can be left &

Setting a specific default value on a field

2001-03-09 Thread Jamie S Buchanan
ld to intially be set to a value of another DateTime field? More specifically, I have two DateTime fields (A and B), in my creation script I want to set the default value of B to the value of A so that when I write a new record to the table the position of B can be left NULL, or equivalent, but the value

Re: Help on default value in set column

2001-02-23 Thread MikeBlezien
On Fri, 23 Feb 2001 15:54:03 +0100, Yong Li <[EMAIL PROTECTED]> wrote: >>Hi, >> >>I wanted to create a column with type set, and to specify a default >>value for this column, but I always got either SQL syntax error or >>invalid default value error. What is t

Help on default value in set column

2001-02-23 Thread Yong Li
Hi, I wanted to create a column with type set, and to specify a default value for this column, but I always got either SQL syntax error or invalid default value error. What is the right syntax for doing this? or, it's impossible to do this? I am using MySQL 3.23.25. Thanks in advance. Yo

version 3.20.32a default value weirdness

2001-01-24 Thread Nikos Andronikos
hey all, i'm having some problems with 3.20.32a not accepting any default values. on the following test create i get ERROR: Invalid default value for 'testid' create table tbltest ( testid mediumint(11) unsigned DEFAULT '0' NOT NULL auto_increment, test char(12) NOT

RE: Default value for DATE column

2001-01-16 Thread Julian Strickland
Try using the following:- Format(Date,"-mm-dd") instead of ???/ > -Original Message- > From: Apolinaras "Apollo" Sinkevicius [SMTP:[EMAIL PROTECTED]] > Sent: 15 January 2001 20:43 > To: [EMAIL PROTECTED] &

Re: Default value for DATE column

2001-01-15 Thread Pete Harlan
they are often not an acceptible substitute for initializing a field with the current date. --Pete > Use the timestamp datatype, not date. > > At 02:43 PM 1/15/2001 -0600, Apolinaras \"Apollo\" Sinkevicius wrote: > >I would like to set a default value in DATE

Re: Default value for DATE column

2001-01-15 Thread Scott Baker
Use the timestamp datatype, not date. At 02:43 PM 1/15/2001 -0600, Apolinaras \"Apollo\" Sinkevicius wrote: >I would like to set a default value in DATE type column to Date(), but it >doesn't work. Is there a way to do it through column format? >If not, what should I en

Default value for DATE column

2001-01-15 Thread Apolinaras \"Apollo\" Sinkevicius
I would like to set a default value in DATE type column to Date(), but it doesn't work. Is there a way to do it through column format? If not, what should I enter in the VB code below (place where I need help will have ) Private Sub okButton_Click() Dim db As Database

RE: Problem with creating default value

2001-01-14 Thread Carsten H. Pedersen
> Hi. This is a really easy question: > > I have an existing table called clients. I have an existing field called > CPicture. I'm trying to add a default value of "no". > > I've tried several times and can't seem to get it right. So, does anyone

Problem with creating default value

2001-01-14 Thread Mike Yuen
Hi. This is a really easy question: I have an existing table called clients. I have an existing field called CPicture. I'm trying to add a default value of "no". I've tried several times and can't seem to get it right. So, does anyone know how I can add a de