On Fri, 16 Mar 2001, Jason Landry wrote:

> Subqueries like that won't work until version 4.0.
> 
> for now it's rather ugly and inefficient, but one way you could do it would
> be like this:
> 
> select table1.*, ifnull(table2.column2,-1) as marked from table1 left join
> table2 on table1.column1=table2.column2 having marked=-1

First when I read this I thought that you probably wanted 'where marked=-1' rather 
than 'having marked=-1' but yo are right <?>
I tried it with 'where marked=-1' and I got an error that it didn't know which one 
column 'marked' is. Strange...

Anyway, some questions/comments:

I tried doing a bulk load (load data infile...) of 1M rows in a single table with 100 
columns. It took ~13mins. Then I tried doing an insert...select from a source table to 
my destination table, and it was over in ~1min. I though things would have been the 
other way around (seems everything I 'think of' today, us wrong :-)

The other thing is that if a user has a password with spaces in the end of it, mysql 
trims of the trailing spaces before validating. So if my passwd is abcd and I give 
abdc[space], I still get granted access. I didn't like that :-(  Would rather like to 
have trailing spaces.

regards,
thalis

 
> I've done something similar before, and it worked ok.  Of course having
> subqueries will be nice.
> 
> ----- Original Message -----
> From: "Carl Karsten" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, March 16, 2001 12:13 AM
> Subject: Re: question about NOT IN
> 
> 
> > select * from table1 where column1 not in (select column2 from table2)
> >
> > ----- Original Message -----
> > From: <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, March 15, 2001 7:13 PM
> > Subject: question about NOT IN
> >
> >
> > > Please I would want how I can get the list of records from a
> > > table1 that do not appears on a table2, supossing a column
> > > e.g code is used as connector or joiner present at both
> > > tables;
> > >
> > > Thanks
> > >
> > >
> > > Ernesto
> > >
> > > ---------------------------------------------
> > > Este mensaje fue enviado a través de Qnet
> > > http://www.qnet.com.pe


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

Reply via email to