reg: on delete cascade

2008-03-11 Thread smriti Sebastian
I created two tables like this: create table customer(SID int,name varchar(20),primary key(SID)); create table orders(OID int,O_Date date,customer_SID int,primary key(OID),Foreign key(customer_SID) references customer(SID) on delete cascade on update cascade); And inserted values into it.but when

Re: Migrate HUGE Database

2008-03-11 Thread Richard Heyes
How very inconsistent and obnoxious. But yet far more secure. FWIW, if you're transferring between machines you can gzip the output of mysqldump to compress it, resulting in far less transfer time. Eg. mysqldump -u username -p database_name | gzip -c dump.sql.gz IIRC -- Richard Heyes

R: Migrate HUGE Database

2008-03-11 Thread Nanni Claudio
Hi Terry, you should try using mysql command line tools. Aloha! Claudio Nanni -Messaggio originale- Da: Terry Babbey [mailto:[EMAIL PROTECTED] Inviato: lunedì 10 marzo 2008 19.30 A: mysql@lists.mysql.com Oggetto: Migrate HUGE Database Hello, I have a huge database that I would like

Re: reg: on delete cascade

2008-03-11 Thread Rob Wultsch
On Tue, Mar 11, 2008 at 1:51 AM, smriti Sebastian [EMAIL PROTECTED] wrote: I created two tables like this: create table customer(SID int,name varchar(20),primary key(SID)); create table orders(OID int,O_Date date,customer_SID int,primary key(OID),Foreign key(customer_SID) references

calculating breaks for an employee

2008-03-11 Thread Thufir
Just thinking out-loud, but what design would lend itself to: scheduled break: 11:00-11:15 actual break: 10:30-10:40; 11:20:11:25 the point is to capture the fact that the break was taken not at the scheduled time, as well as the odd duration. Plus, the quantity of breaks. Typically, two

Re: Updating rows in a table with the information from the same table

2008-03-11 Thread Sebastian Mendel
MariSok schrieb: I have a products table with historical price information. Some records are missing price information. I added another field - closest_price, to be populated for records with 0 price. This would be price values from the same table, same product with non-zero price with earliest

RE: on delete cascade

2008-03-11 Thread Rolando Edwards
What is your default storage ? Do this : SHOW ENGINES; You should see something like this: mysql show engines; ++-++ | Engine | Support | Comment |

Re: reg: on delete cascade

2008-03-11 Thread Tim McDaniel
I'll reformat the SQL with line breaks so it looks more readable to me. On Tue, 11 Mar 2008, smriti Sebastian [EMAIL PROTECTED] wrote: I created two tables like this: create table customer(SID int, name varchar(20), primary key (SID)); create table

Re: Migrate HUGE Database

2008-03-11 Thread Tim McDaniel
On Tue, 11 Mar 2008, Richard Heyes [EMAIL PROTECTED] wrote: How very inconsistent and obnoxious. But yet far more secure. You misunderstand. I realize that putting the password on the command line is insecure in the presence of ps auxwww and Process Explorer and such. I'm kvetching about

lock write and sql_cache

2008-03-11 Thread MAS!
does the lock table on MySQL (I'm using 5.0.22 or 5.0.45) works even for a cached result? this is my scenario, (I'm using MyIsam tables) thread 1: LOCK TABLE foo WRITE; thread 2: SELECT * FROM foo ; (locked) thread 1: UNLOCK TABLES; thread 2: result of SELECT * .. and that's is, IMHO,

Help me format this statement

2008-03-11 Thread Brian Dunning
I am an idiot. table_a and table_b have exactly the same structure. How do I say this in SQL: INSERT (all records from table_a) into table_b where table_a.customer = '12' Just trying to eventually duplicate the whole table, one customer's set of records at a time. Thanks. -- MySQL

Re: Help me format this statement

2008-03-11 Thread Brian Dunning
Thanks to everyone who replied. So simple I couldn't see it. :-) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Help me format this statement

2008-03-11 Thread wim . delvaux
On Wednesday 12 March 2008 00:14:46 Brian Dunning wrote: I am an idiot. table_a and table_b have exactly the same structure. How do I say this in SQL: INSERT (all records from table_a) into table_b where table_a.customer = '12' Just trying to eventually duplicate the whole table, one

Store MySQL data files and log files (log bin) separated!!!

2008-03-11 Thread Marcos Vinícius Vieira dos Santos
Hello everyone, I am compiling mysql source and need stored MySQL data files and log files (log bin) separated. For example: /var/log/mysql /* log files and /sgdb/data /* data files I used --localstatedir in ./configure but both data files and log files was stored together. How do