Delete in many tables

2001-06-26 Thread Johan Nilsson
and then later on delete from the primary table, but that is one delete query/row? Is there any smart way to do this? Can I user temporary tables when deleting? INSERT...SELECT works but I havn't figured out how to use this temporary table in a DELETE query (I don't think it's pos

Delete in one table with information from another table

2001-06-27 Thread Johan Nilsson
n_name = 3 Regards, Johan Nilsson Software Developer BeCon Mobile Internet AB, Sweden E-Mail: [EMAIL PROTECTED] Web: http://www.beconmobile.com > -Ursprungligt meddelande- > Fran: Sinisa Milivojevic [mailto:[EMAIL PROTECTED]] > Skickat: den 27 juni 2001 14:27 > Till: [EMAIL PROT

SV: DELETING items

2001-07-16 Thread Johan Nilsson
m tracking > where id = select temp.id from temp; sub queries are not yet implemented in MySql, but will be in 4.0... > drop table temp; > > But this fails. > > I am not a SQL guru, and would appreciate any help > > Rob > Regards, Johan Nilsson --

inheritance of privileges?

2001-07-19 Thread Johan Nilsson
r this database with DROP privileges he can run a drop script? why, isn't the privileges from mysql.user inherited when running from the prompt (when running scripts)? Regards, Johan Nilsson Software Developer BeCon Mobile Internet AB, Sweden Web: http://www.beconmobile.com E-Mail: [EMAIL PROTEC

SV: Put together (Merge) two tables in one

2001-07-20 Thread Johan Nilsson
See section: "7.21.1 INSERT ... SELECT Syntax" Regards, Johan Nilsson Software Developer BeCon Mobile Internet AB, Sweden Web: http://www.beconmobile.com E-Mail: [EMAIL PROTECTED] Office: +46 457 44184 Cellular: +46 709 798897 > -Ursprungligt meddelande- > Fran

SV: Anyone knows what's wrong with this INSERT sentence?

2001-07-20 Thread Johan Nilsson
INSERT INTO table1 (email) SELECT email FROM table1, table2 WHERE table1.email <> table2.email; the select is a "new" query, you have to join table1 and table2... Regards, Johan Nilsson Software Developer BeCon Mobile Internet AB, Sweden Web: http://www.beconmobile.com E-Mail:

SV: inheritance of privileges?

2001-07-23 Thread Johan Nilsson
> -Ursprungligt meddelande- > Fran: Sinisa Milivojevic [mailto:[EMAIL PROTECTED]] > Skickat: den 19 juli 2001 15:36 > Till: [EMAIL PROTECTED] > Kopia: [EMAIL PROTECTED] > Amne: Re: inheritance of privileges? > > > Johan Nilsson writes: > > Privileges q

Is it possible to group by an interval?

2001-08-22 Thread Johan Nilsson
INTERVAL HOUR +--+ | COUNT(*) | +--+ | 1 | | 3 | +--+ It it's possible, how do i write it? or if it's not possible, what can I do instead? Regards, Johan Nilsson Software Developer BeCon Mobile Internet AB, Sweden Web: http://www.beconmobile.com E-Ma

SV: Is it possible to group by an interval?

2001-08-22 Thread Johan Nilsson
---+ | 1 | 2000-01-01 08:30 | <- i.e. 2000 | 2 | 2000-01-01 08:31 | <- i.e. 2000 | 3 | 2001-01-01 08:30 | | 4 | 2001-01-01 09:31 | | 5 | 2001-01-01 09:32 | | 6 | 2001-01-01 09:32 | +---+ +------+ | COUNT(*) | +--+ | 2 | <- same hour as bel