Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

city referencing non existing state (16 cases found) #110

Open
yassinumer opened this issue Mar 27, 2021 · 1 comment
Open

city referencing non existing state (16 cases found) #110

yassinumer opened this issue Mar 27, 2021 · 1 comment

Comments

@yassinumer
Copy link

Hello, I wanted to inform you that I found 16 records in the city table referencing states that do not exist. Is it possible to fix this?

mysql> select * from city where state_id not in (select id from state);
+-------+----------------+----------+
| id    | name           | state_id |
+-------+----------------+----------+
| 39667 | Ilan           |     3478 |
| 39668 | Lotung         |     3478 |
| 39669 | Suao           |     3478 |
| 39670 | Toucheng       |     3478 |
| 39695 | Dali           |     3489 |
| 39696 | South District |     3489 |
| 39697 | Ta-Ya Shang    |     3489 |
| 39698 | Dali           |     3490 |
| 39699 | South District |     3490 |
| 39700 | Ta-Ya Shang    |     3490 |
| 39714 | Hsilo          |     3499 |
| 39715 | Huwei          |     3499 |
| 39716 | Peikang        |     3499 |
| 39717 | Touliu         |     3499 |
| 39718 | Tounan         |     3499 |
| 39719 | Tuku           |     3499 |
+-------+----------------+----------+
16 rows in set (0.03 sec)
@yassinumer
Copy link
Author

There are also several states that have not yet been referenced from the city table? I find that abnormal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant