I want to load some tables into my application but the only tables I want are the tables that have been updated.
I got in some of the databases I got an table called "Updated" but I don't have this table in every database in other databases I use the last 100 from the field ID.
What I want to do is an if/else statement where something like this happens:
IF EXISTS SELECT * FROM table1 WHERE column1 = updated
ELSE SELECT TOP 100 table1 FROM column1 ORDER BY column1 DESC
I hope I made myself clear and hope you guys can help me.