Hi!
(I am very novice in MySQL)
Is it possible create view(virtual table?) from distinct values of main tables ? Or I always must create two real tables with foreign key ?
Example :
I have main table:
ID| Name| City
1 | Ivan | Moscow
2 | Dmitry | Moscow
3 | John | New York
Can I have view from City column with automatic update values ?
Moscow
New York
And when I add next row to main table:
4| Mario |Rome
I want automaticaly update view :
Moscow
New York
Rome
(I am very novice in MySQL)
Is it possible create view(virtual table?) from distinct values of main tables ? Or I always must create two real tables with foreign key ?
Example :
I have main table:
ID| Name| City
1 | Ivan | Moscow
2 | Dmitry | Moscow
3 | John | New York
Can I have view from City column with automatic update values ?
Moscow
New York
And when I add next row to main table:
4| Mario |Rome
I want automaticaly update view :
Moscow
New York
Rome