select 
	concat('update TEACHER set TEACHER.KEY_PUBLICATIONS_NUMBER = ', 
	PUBLICATIONS_NUMBER.ID_INTERNAL, 
	' where TEACHER.ID_INTERNAL = ', 
	PUBLICATIONS_NUMBER.KEY_TEACHER, 
	';') 
as "" from PUBLICATIONS_NUMBER;