SELECT GROUP_CONCAT(col.COLUMN_NAME) FROM information_schema.COLUMNS col WHERE col.TABLE_SCHEMA = 'test' AND col.TABLE_NAME = 'user' AND COLUMN_NAME NOT IN ('created_at', 'updated_at') INTO @cols;
SET @s = CONCAT('SELECT ', @cols, ' FROM test.user');