Re: Modify type

2004-10-19 Thread Egor Egorov
Jerry Swanson [EMAIL PROTECTED] wrote:

 I have field date type of datetime. I need to modify to timestamp.
 If I alter the table and mofiy the field will this crash the data in
 the field.

MySQL server will crash? Please show us the error message. 





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Modify type

2004-10-14 Thread Jerry Swanson
I have field date type of datetime. I need to modify to timestamp.
If I alter the table and mofiy the field will this crash the data in
the field.

TH

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Using ALTER to modify type of a Primary Key; URGENT

2001-10-26 Thread Don Read


On 26-Oct-2001 Tim Evans wrote:
 I have inherited a database built by someone else who was apparently
 very
 stingy. :-)
 
 A primary key was set to 'tinyint(4)' limiting the number of records
 to 128.
 
 I've tried:
 
 alter table my_data modify phyid mediumint unsigned DEFAULT 0;
 
 ...but got:
 
 ERROR 1121: Column 'phyid' is used with UNIQUE or INDEX but is not
 defined as NOT NULL
 

wait for it ...

alter table my_data modify phyid mediumint unsigned NOT NULL DEFAULT 0;

you may now bang your head on the wall.

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Using ALTER to modify type of a Primary Key; URGENT

2001-10-26 Thread Aleksandar Bradaric

Hi,

 A primary key was set to 'tinyint(4)' limiting the number of records
 to 128.

 I've tried:

 alter table my_data modify phyid mediumint unsigned DEFAULT 0;

 ERROR 1121: Column 'phyid' is used with UNIQUE or INDEX but is not
 defined as NOT NULL

Try:
alter table  my_data modify phyid mediumint unsigned NOT NULL DEFAULT 0;
 

Sasa



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Using ALTER to modify type of a Primary Key; URGENT

2001-10-25 Thread Tim Evans

I have inherited a database built by someone else who was apparently
very
stingy. :-)

A primary key was set to 'tinyint(4)' limiting the number of records
to 128.

I've tried:

alter table my_data modify phyid mediumint unsigned DEFAULT 0;

...but got:

ERROR 1121: Column 'phyid' is used with UNIQUE or INDEX but is not
defined as NOT NULL

This is version 3.22.30, and resolving this is quite urgent.  Please and
thank you.
-- 
Tim Evans   |5 Chestnut Court
[EMAIL PROTECTED] |Owings Mills, MD 21117
http://www.tkevans.com/tkevans.html |(443) 394-3864

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php