SQL
ndicke20085
Messages postés
3
Date d'inscription
Statut
Membre
Dernière intervention
-
ndicke20085 Messages postés 3 Date d'inscription Statut Membre Dernière intervention -
ndicke20085 Messages postés 3 Date d'inscription Statut Membre Dernière intervention -
Bonjour tout le monde J'ai un problème qui m empêche de dormir pendant 2 jours et pourtant sa semble être très simple.
Je dois fare une requetes joingant 2 tables
La premiere est la suivante
CREATE TABLE IF NOT EXISTS 'jobs' (
'ID' int(11) NOT NULL AUTO_INCREMENT,
'cust_id' varchar(100) NOT NULL,
'job_id' int(11) NOT NULL,
'job_title' varchar(250) NOT NULL,
'address' text NOT NULL,
et la deuxiemme est la suivante
CREATE TABLE IF NOT EXISTS 'customers' (
'ID' int(11) NOT NULL AUTO_INCREMENT,
'cust_id' varchar(100) NOT NULL,
'cust_name' varchar(250) NOT NULL,
'first_name' varchar(100) NOT NULL,
'last_name' varchar(100) NOT NULL,
'email' varchar(100) NOT NULL,
'password' varchar(40) NOT NULL,
et la requete est la suivante
select first_name,last_name
from customers
JOIN
jobs
ON
where customers.cust_id==jobs.cust_id
and job_title="Bike Wash";
et il me donne cette erreur a chaque fois
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where customers.ID=customers.cust_id and customers.cust_id=jobs.ID ' at line 6
Quelqu un qui peut m aider STP
Je dois fare une requetes joingant 2 tables
La premiere est la suivante
CREATE TABLE IF NOT EXISTS 'jobs' (
'ID' int(11) NOT NULL AUTO_INCREMENT,
'cust_id' varchar(100) NOT NULL,
'job_id' int(11) NOT NULL,
'job_title' varchar(250) NOT NULL,
'address' text NOT NULL,
et la deuxiemme est la suivante
CREATE TABLE IF NOT EXISTS 'customers' (
'ID' int(11) NOT NULL AUTO_INCREMENT,
'cust_id' varchar(100) NOT NULL,
'cust_name' varchar(250) NOT NULL,
'first_name' varchar(100) NOT NULL,
'last_name' varchar(100) NOT NULL,
'email' varchar(100) NOT NULL,
'password' varchar(40) NOT NULL,
et la requete est la suivante
select first_name,last_name
from customers
JOIN
jobs
ON
where customers.cust_id==jobs.cust_id
and job_title="Bike Wash";
et il me donne cette erreur a chaque fois
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where customers.ID=customers.cust_id and customers.cust_id=jobs.ID ' at line 6
Quelqu un qui peut m aider STP
A voir également:
- SQL
- Logiciel sql - Télécharger - Bases de données
- Requete sql pix - Forum PHP
- Additions et multiplication dans des requêtes SQL ✓ - Forum MySQL
- Sql query download - Télécharger - Gestion de données
- Ora-00933: la commande sql ne se termine pas correctement ✓ - Forum Oracle