you said you are inserting from a to b, in any case you will get that error by logic unless you have enabled PK with novalidate instruction

you said you create the table in b as a, you have not said if you have created it empty or with data

so basically I dont know what you are talking about