I am creating database . I am trying to find 2 columns with same name Jan I got 2 Tablets:
Table 1 :
CREATE TABLE Zamestnanci
(
id_Zamestnanca int not null,
Meno varchar(50) null,
Priezvisko varchar(50)null,
Adresa varchar(50) null,
Datum_narodenia date null,
PRIMARY KEY (id_Zamestnanca)
);*
Table 2 :
*
CREATE TABLE ObčaniaSR
(
id_Občana int not null,
Meno varchar(50) null,
Priezvisko varchar(50) null,
Adresa varchar(50) null,
Datum_narodenia date null,
Zápis_v_trestnom_registry varchar(50) null,
PRIMARY KEY (id_Občana)
);*
I created querry :
SELECT Zamestnanci.Meno, ObčaniaSR.Meno
FROM Zamestnanci
JOIN ObčaniaSR
ON Zamestnanci.Meno = ObčaniaSR.Meno
Where Zamestnanci.Meno AND ObčaniaSR.Meno = 'Ján';
What AM I doing wrong Thank you for your answers and advices.