I have two tables (Internal_Complaints and CUSTOMER) I WANT to DO a SQL query if the value (ID) table 2(Internal_Complaints) is not the same as table 1(CUSTOMER)(ID) cannot insert that value to table 2(Internal_Complaints) return error
table 1: CUSTOMER
+-------+---------------+
| id | Custer_name |
+-------+---------------+
| 1 | Muhd |
| 2 | Jamsboon |
| 3 | Hakim |
| 4 | Siti |
+-------+---------------+
table 2: Internal_Complaints
+--------+---------------+----------------+
|id | Custer_name | Complaint |
+--------+---------------+----------------+
| 1 | Muhd |Test |
+--------+---------------+----------------+
This is what I want to Output:
+-------+----------+------------------------------------+
|id | name | Complaint |
+-------+----------+------------------------------------+
| 1 | Muhd | Test |
+-------+----------+------------+-----------------------+
If No ID in table 1 (CUSTOMER) will return error