use this
create table tableColumn1 (db varchar(300), tableName varchar(1000), columnName varchar(1000))
sp_msforeachdb 'insert into tableColumn1 select "?" AS db, a.name tableName, b.name columnname from [?].sys.tables a join [?].sys.columns b on a.object_id = b.object_id order by 2,3'
select * from tableColumn1