Answer the question
In order to leave comments, you need to log in
How to select from all tables of one database in SQL Server?
How to select from all tables of one database in SQL Server?
For example:
Select * from database where column_name.xxx ='yyy'
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
Just specify the tables separated by commas, then the column names must match.
In the code above, the condition is, if from table 1 Id is greater than in the user, we pull out the records.
Naturally insert your condition. )
And after FROM is not the name of the database (database), but the names of the tables.
After FROM, you can try to insert * , which means "everything", but I'm not sure if this will work.
SELECT * FROM sys.tables t1
JOIN sys.columns t2 ON t1.object_id=t2.object_id
WHERE t2.column_name.xxx ='yyy'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question