ResultSet resultSet = statement.executeQuery("SELECT people.occupation_code,people.country_of_birth,"
+ " countries.currency_name, countries.telephone_code "
+ "FROM people,countries"
+ "WHERE people.country_of_birth = countries.name ");
我目前正在使用MySQL数据库,当我编译程序时,我有:不唯一的表/别名:'people'。 查看以前与此相关的问题,发现通常在您加入两个表时出现。但我没有。
答案 0 :(得分:2)
FROM people,countries"
+ "WHERE people.country_of_birth = countries.name ");
你需要一个国家之后的空间。
FROM people,countries "
+ "WHERE people.country_of_birth = countries.name ");