+ 1
Help, I have 3 identical tables with similar data, now I want to create a 4th table with only unique data from all the 3 tables.
8 Respuestas
+ 8
but why , it will not work
+ 7
use foreign key for connecting tables ... and put primary key on those columns on which u r applying foreign k. to connect tables
+ 2
use Distinct keyword
+ 2
SELECT DISTINCT (COL_NAME) FROM TABLE(S) NAME
+ 1
@sahu I need to do it with all the three combined together.
+ 1
@sahu I don't want distinct from each table itself but unique data from each table.
+ 1
@Gaurav that will not work.
+ 1
@Gaurav the three tables were originally installed on 3 separate machines, then they were imported into a single database, therefore they have no common key.