What is the syntax to filter information from two different tables | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the syntax to filter information from two different tables

3rd Jan 2017, 11:43 AM
Shraddha Dangiste
Shraddha Dangiste - avatar
3 Answers
+ 2
well, try this if both tables have some column names that are the same, then we can have SELECT table1.column2, table2.column3 FROM table1, table2;
5th Jan 2017, 4:27 PM
Oyelakin Dotun Peter
Oyelakin Dotun Peter - avatar
+ 1
IF the both tables have something in common, you can use the join command and after that you can use any filter you would like to use. Example: select * from A join B on a.column = b.column where a.column = parameter; thats one way to do it, now if both tables are have nothing in common, you have to use different querys.
3rd Jan 2017, 2:04 PM
Janier Almarza
Janier Almarza - avatar
+ 1
yes if the child table has the foriegn key then you may use the concept of joining table, and then place the necessary filters using "where" command.
22nd Jan 2017, 11:00 PM
mahendra mahajan
mahendra mahajan - avatar