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] After importing

Re: modify default value

2007-09-15 Thread Baron Schwartz
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 NULL DEFAULT $sample_id[$idx

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 Mailing

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

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: 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

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: MySQL 5.0.2 Default Value

2005-03-09 Thread Paul DuBois
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, but I'll guess

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 pictures SET picture_name=DEFAULT; -- don't think

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 someone removes

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 is the default length

Re: Specifying an index length and the default value

2004-05-30 Thread David Griffiths
- 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? The default is to index

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

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: 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 achieving this

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

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 TABLE lpamform

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't. Default

Re: Datetime Default Value

2004-04-19 Thread Paul DuBois
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 answer

Re: Datetime Default Value

2004-04-19 Thread Paul DuBois
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 answer

Re: Datetime Default Value

2004-04-19 Thread Stormblade
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 this possible? Defaults must be constants

Re: Datetime Default Value

2004-04-19 Thread Paul DuBois
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

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
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: Datetime Default Value - I want to know too!

2004-04-18 Thread Adam
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. 2. Use datetime

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 value

Re: Datetime Default Value

2004-04-18 Thread Michael Stassen
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 for my

Re: Datetime Default Value

2004-04-18 Thread Stormblade
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 much. I

Re: Datetime Default Value

2004-04-18 Thread Rhino
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, 18 Apr 2004 12:17:00 -0400, Michael Stassen wrote: Stormblade wrote: Hey all

Re: Datetime Default Value

2004-04-18 Thread Michael Stassen
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 much. I

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 Stormblade
. 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. :( Hence, if you leave out the date column

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 default

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: [Mysql-discussions] HOW TO RUN SQL and default value ?

2004-02-09 Thread Remko Lodder
mysql -ppassword -u username -e shell commands for sql like select 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

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') | YES | | NULL

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. Matt - Original Message - From: Mike

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]

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

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

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' data preserved. Is there a way to find out what

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 that I can issue

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 unsubscribe:http

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 http

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] http

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

2003-06-25 Thread Roman Neuhauser
] / 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 tables. I have spent many hours trying to find the problem, but no luck so far. According to the manual, it should work. I

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

2003-06-24 Thread Ruth Zhai
- 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 piggyback on other people's threads. you can start your own for free

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

Re: Help With Default Value

2003-03-31 Thread gerald_clark
[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 Vyas [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED]; [EMAIL

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 and BIGINT unsigned

Re: Help With Default Value

2003-03-30 Thread Bhavin Vyas
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 be this: Column names of importance: idinvoice_id id

Re: Help With Default Value

2003-03-30 Thread MySQL List
Value 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 First option, I don't think

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

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

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

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 default value of 'N

Re: conditional default value

2003-02-15 Thread Paul DuBois
= '' 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 = ''; Documentation? Regards -- Tim Johnson

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 = '' the default value of 'N/A' be substituted. Is this possible to do in MySQL? Documentation? AFAIK there's no way

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 | Perl

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 constant

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

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: 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/CREATE_TABLE.html

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: 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 Is there a wat to have mySQL auto fill

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 function curDate

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 appear to work for me

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

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 inserting new column in table field a will contains

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 timestamp? In general, this cannot be done

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: 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) 349-5454 Cell: (408

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 VARCHAR

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 (LocationID VARCHAR(10

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 into table (column1

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 NULL. If the column

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 assigns one. If the column may take NULL

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é', 'Producteur

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 table the position of B can be left wh

Setting a specific default value on a field

2001-03-09 Thread Jamie S Buchanan
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: Setting a specific default value on a field

2001-03-09 Thread Peter Skipworth
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 of A will be stored in it's

Re: Setting a specific default value on a field

2001-03-09 Thread Gerald L. Clark
? 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 of A will be stored in it's place. I later

Re: Help on default value in set column

2001-02-23 Thread MikemickaloBlezien
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 the right syntax for doing this? or, it's

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 Dim

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 enter in the VB

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 def

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 know how I can add a def