Re: Tables cities and table user
From: Luuk <luuk_at_invalid.lan>
Date: Sat, 9 Feb 2019 10:30:02 +0100
Message-ID: <5c5e9d66$0$22355$e4fe514c_at_news.xs4all.nl>
Date: Sat, 9 Feb 2019 10:30:02 +0100
Message-ID: <5c5e9d66$0$22355$e4fe514c_at_news.xs4all.nl>
On 9-2-2019 10:09, ^Bart wrote:
> Hi Everybody!
>
> I need to connect a table named users to the city's tables but I don't
> know if this below could be the right choice:
>
> cities_it
> -------------
> id_city
> name
>
> cities_uk
> -------------
> id_city
> name
>
> cities
> id_city
> FK_cities_it_id_city
> FK_cities_uk_id_city
>
> users
> ------------
> id_user
> name
> FK_cities_id_city
>
> Regards.
> ^Bart
I would probably create the table cities like this:
SELECT id_city,name,'IT' from cities_it
union all
[Quoted] SELECT id_city,name,'UK' from cities_uk
[Quoted] or, even better (before someone else askes this question): Why do you have mulitple tables with city names? Received on Sat Feb 09 2019 - 10:30:02 CET