left joins are your key
select * from a
left join b on id = tbl_id and b.tbl = a
where b.tbl_id is null
(not 100% sure on my syntax, but note the join, and the limitation on 'left' result
set is specified within the left join clause)
-Original Message-
From: Dean A. Hoover
At 14:03 -0500 12/12/03, Dean A. Hoover wrote:
I am using version 3.23.58 and need to do
the following:
select * from a where id not in (select tbl_id from b where tbl=a);
Given that my version does not support sub selects, how
can I re-write the statement to get the desired results?
Mauro Andre Flores dos Santos [EMAIL PROTECTED] wrote:
I've just downloaded the version 4.1.
I tryed to run my first sub-select :
SELECT curso.*
FROM curso
where curso.cdCurso IN
(SELECT EstabMantemCurso.cdCurso
FROM EstabMantemCurso)
The following ERROR returned:
[local] ERROR
Elby,
The MySQL-4.0.9-gamma to windows supports sub select?
Nope. Subselect are supported as of 4.1.
Regards,
--
Stefan Hinz [EMAIL PROTECTED]
iConnect GmbH http://iConnect.de
Heesestr. 6, 12169 Berlin (Germany)
Telefon: +49 30 7970948-0 Fax: +49 30 7970948-3
be re-written as:
SELECT * FROM Customers INNER JOIN Cities ON Customers.CityID =
Cities.CityID
WHERE Cities.ProvinceID = ON
Hth,
Arthur
-Original Message-
From: Stefan Hinz [mailto:[EMAIL PROTECTED]]
Sent: February 13, 2003 8:36 AM
To: Elby Vaz
Cc: [EMAIL PROTECTED]
Subject: Re: [ sub
On Thursday 13 February 2003 15:03, Elby Vaz wrote:
The MySQL-4.0.9-gamma to windows supports sub select?
Nope.
Ex.: select ... from ... where ... in (select.)
If not, has some version that supports it?
Subselects will come in 4.1
--
For technical support contracts, goto
hi guys i was wondering if sub selects were possible in mysql 4 ? more
specifically , whenever i do a join , i sometimes require a distinct select on
the field in the first table and the second table may have many rows therefore
returns the same value more than once from the first table which
On Wed, Jan 08, 2003 at 07:05:41PM -0800, Sal wrote:
Hi,
I'm using MySQL 4.0.7 gamma version. I just want to
know if MySQL support sub select statement. The
example of sub select statement is as below. I've
tried many times but then get an error.
No. They are in 4.1.0.
--
Jeremy D.
Dear Jeremy,
Thaks 4 ur info. Where can I get MySQL 4.1.0.
regards,
Sal
--- Jeremy Zawodny [EMAIL PROTECTED] wrote:
On Wed, Jan 08, 2003 at 07:05:41PM -0800, Sal wrote:
Hi,
I'm using MySQL 4.0.7 gamma version. I just want
to
know if MySQL support sub select statement. The
example
On Thursday 09 January 2003 09:32, Sal wrote:
Thaks 4 ur info. Where can I get MySQL 4.1.0.
You can compile it from development source tree:
http://www.mysql.com/doc/en/Installing_source_tree.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This
I have the following query. When executed in MySQL I get an error on the
first sub-select, and I can't find why:
http://www.mysql.com/doc/en/News-4.1.x.html
You'll see that sub-select query will be in future 4.1.xx release ...
David
-like thingie) Re:
Sub-select look-alike?
Hi Bill,
you wrote to me and probably several other people:
If I understand your question, you just need to join with the languages
table twice, using aliases:
select LF.language, LT.language
from language_pairs P, languages LF, languages
SELECT f.language as From, t.language as To
FROM language f, language t, language_pairs lp
WHERE f.id = lp.from
AND t.id = lp.to;
--Greg Johnson
-Original Message-
From: Andreas Frøsting [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 10:13 AM
To: [EMAIL PROTECTED]
Subject:
Is that what you want?
SELECT languages.language, languages.fieldN, .., language_pairs.fieldX
FROM language_pairs INNER JOIN
Languages ON languages.id=language_pairs.id WHERE /* conditions */
-Original Message-
From: Andreas Frøsting [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March
Hi Greg,
SELECT f.language as From, t.language as To
FROM language f, language t, language_pairs lp
WHERE f.id = lp.from
AND t.id = lp.to;
I really need to get some sleep I think.
So simple, and yet my buggy mind didn't come up with that solution.
Thanks,
//andreas
(sql, query - just to
If I understand your question, you just need to join with the languages
table twice, using aliases:
select LF.language, LT.language
from language_pairs P, languages LF, languages LT
where LF.id = P.from and LT.id = P.to;
From: =?iso-8859-1?Q?Andreas_Fr=F8sting?= [EMAIL PROTECTED]
To:
no
-Original Message-
From: Lyubomir Simich [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 15, 2001 12:04 PM
To: [EMAIL PROTECTED]
Subject: SUB-SELECT
Importance: High
Hello
Can I make a query in mySQL like this?
DELETE FROM table1
WHERE id NOT EXIST IN (SELECT
they will be in mysql 4.1
-Original Message-
From: Rosyna [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 15, 2001 2:11 PM
To: Christopher Book; '[EMAIL PROTECTED]'
Subject: Re: SUB-SELECT
Anyone know if subselects will be available in the future?
Ack, at 11/15/01, Christopher
On 07 Aug 2001 10:46:31 -0400, Trond Eivind Glomsrød wrote:
MySQL doesn't have subselects. Some workarounds can be found at
http://www.mysql.com/documentation/mysql/bychapter/manual_Introduction.html#Missing_Sub-selects
PostgreSQL supports them.
Actually MySQL 4.0 will do.
--
For
Den 01-08-07 14.57, skrev Anders Alstrin [EMAIL PROTECTED]:
Does anyone know how to do this sub select in MySQL.
I know how to do it in Oracle!
table media
+--+---+--+
| media_id | price |filename |
+--+---+--+
|3 | 0 | cal.jpg |
|
I don't think MySQL supports sub selects.
Tyler
On Tue, 07 Aug 2001 14:57:33 +0200
Anders Alstrin [EMAIL PROTECTED] wrote:
Does anyone know how to do this sub select in MySQL.
I know how to do it in Oracle!
table media
+--+---+--+
| media_id | price |filename |
you can rewrite this query to simple joins so you dont use sub selects.
select media.media_id , media.price, media.filename
from media,category_locks,categories
where media.media_id = category_locks.media_id
and category_locks.category_id = categories.category_id
and categories.dynamic_media =
Anders Alstrin [EMAIL PROTECTED] writes:
Does anyone know how to do this sub select in MySQL.
MySQL doesn't have subselects. Some workarounds can be found at
http://www.mysql.com/documentation/mysql/bychapter/manual_Introduction.html#Missing_Sub-selects
PostgreSQL supports them.
--
Trond
On 07 Aug 2001 14:57:33 +0200, Anders Alstrin wrote:
SELECT * FROM media
WHERE media_id = (SELECT media_id FROM category_locks
WHERE category_id = (SELECT category_id FROM categories
WHERE dynamic_media = 'true'))
A MySQL way to do it?
Something like that should work:
SELECT * FROM
:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 9:58 AM
To: Anders Alstrin
Cc: [EMAIL PROTECTED]
Subject:Re: Sub select.
I don't think MySQL supports sub selects.
Tyler
On Tue, 07 Aug 2001 14:57:33 +0200
Anders Alstrin [EMAIL PROTECTED] wrote:
Does anyone know how to do
Dear Anders,
subselects have not yet been implemented. You can find lots of
workaround examples here:
http://www.mysql.com/doc/M/i/Missing_Sub-selects.html
Regards,
--
Stefan Hinz
Geschäftsführer / CEO iConnect e-commerce solutions GmbH
# www.js-webShop.com www.iConnect.de
#
26 matches
Mail list logo