First of all, I'm going to guess that English is not your first language and tell you that "jointure" is not the word normally to describe the process of combining two tables in a database: the word you want is "joining".

Second, there are many kinds of joins and you haven't specified which kind you want to do. If you look in the MySQL manual, you will see that there are cross joins, inner joins, straight joins, natural joins, left joins, right joins, etc. You need to figure out which kind of join you want because your decision will affect the way you need to write your SQL.

Third, the manual gives some information and examples on how to do joins. You haven't specified which version of MySQL you are using but if it is Version 5.0, the topic you want is http://dev.mysql.com/doc/refman/5.0/en/join.html. If you are using a different version, you can find the various editions on this page http://dev.mysql.com/doc/.

Fourth, the manual does _not_ do a very good job of explaining the differences between the types of joins. This has been a known deficiency for some time and I am disappointed that this has (apparently) not been addressed yet. I wish I could suggest a good place to see a clear description of how the join types differ but I can't. Maybe someone else here has seen a decent tutorial on the differences between the types of joins....

However, if you plan to do an inner join, which is the kind most people do most of the time, your syntax will look like this:

select id, conf
from confs as c inner join conf_id as i on c.id = i.id
where id != '101.33.55.123'

If you need to do a different kind of join, please specify which kind you want to do and perhaps someone here can suggest the right syntax.


--
Rhino

----- Original Message ----- From: "Patrick Aljord" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Tuesday, April 25, 2006 8:48 PM
Subject: need help for my jointure


I have a table confs like this:
id int 5 auto_increment primary key;
conf text;

and another table conf_ip like this:
id int 5 auto_increment primary key;
conf_id int 5; ==>foreing key of confs
ip varchar 150;

I would like to
select id, conf from confs where ip!='some val';

how can I do this?

thanx in advance

Pat

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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.6/323 - Release Date: 24/04/2006




--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.6/323 - Release Date: 24/04/2006


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

Reply via email to