INSERT INTO tenant_histories(H_SURNAME,H_GIVEN_NAME,H_CONTACT_NUM,H_REF_CONTANCT_NUM,H_OCCUPTION_DATE,H_TENANT_C
OMP_ADD,H_TENANT_COMP_NAME,TENANT_ID)
SELECT *
FROM tenants
WHERE tenant_id = tenant_id
obviously if the query returns more than one row then you will be inserting several rows




Reply With Quote