Hi, i need to get different tables by comparing two different databases. It should be in single select query.
select Name From DB1.sys.objects where type_desc='USER_TABLE' EXCEPT select Name From DB2.sys.objects where type_desc='USER_TABLE' in this case i will get tables which are not present in the DB2
similarly to get vice versa,
select Name From DB2.sys.objects where type_desc='USER_TABLE' EXCEPT select Name From DB1.sys.objects where type_desc='USER_TABLE'
I need these two columns in single select.