How can I return column names in dot notation in MySQL?
You first try was very close. Just prepend the table_name and a dot:

INSERT INTO columns(name) 
SELECT CONCAT(TABLE_NAME,'.',COLUMN_NAME) FROM INFORMATION_SCHEMA.COLUMNS 
WHERE table_name='contacts' or table_name='companies';


Give it a Try !!!