0
votes

I have 2 tables.

Table1: id, row1, row2, row3, etc.

Table2: id, row1, row2, etc.

I need to do a query, that select id, row1, row2 from Table1. But i also want it, to count how many rows, that exists. With the id given from table1, compared to the id in table2.

How can i do that?

1
Give us a sample data please.7alhashmi
Your question is not clear enough to get a good response!sarwar026
I think you should do 2 queries, one to count the results and one to get them. It would result in code easier to maintain.adrian7

1 Answers

0
votes

You can use INNER JOIN on that id.