Friday, November 11, 2011
How to only select fields in one sql table that exist in another sql table
Use the following sql statement to compare tables:
SELECT * FROM table1 WHERE EXISTS (SELECT * FROM table2 WHERE table2.commonvariable = table1.commonvariable)
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Web Design & Marketing
- Click and get an instant quote on your project
No comments:
Post a Comment