java - SELECT query for multiple column with multiple table -
i attach 1 image of problem:
in testing jframe jtextfield insert client id after pressing ok button query select , collect info related customer.then show in jtablemodel. i attach database image. error "sql code cannot executed".
you can (without join):
select papers.paper_list,papers_rate.monday,papers_rate.tuesday, papers_rate.wednesday,papers_rate.thrsday,papers_rate.friday, papers_rate.saturday,papers_rate.sunday,magzines.magzine_name,magzines_rate.rate papers,papers_rate,magzines,magzines_rate example_table.customer_id = ? , other conditions" this syntax is, in effect, simple inner join. databases treat same explicit join. clause tells database fields correlate, , returns results if tables listed combined single table based on provided conditions.(http://www.techrepublic.com/article/sql-basics-query-multiple-tables/)
java sql join
No comments:
Post a Comment