Reputation: 7109
I have two table in mysql named rootpath with only one field 'root' and savecatogory with fields brandid,categoryid,name.There is no relation between these two tables.Now how can retrieve root,brandid,categoryid using single query.Please help me.
Upvotes: 0
Views: 620
Reputation: 157870
If there is no relation between these two tables, you just shouldn't try to retrieve it using single query. It is senseless.
Upvotes: 0
Reputation: 47482
Why you need that because
Consider example rootpath has 5 rows
Consider example savecatogoroy has 5 rows
SELECT r.root, s.brandid, s.categoryid FROM rootpath r, savecatogoroy s
Then it gives you 5*5 = 25 results
Upvotes: 1