-2

I want to count the number of rows of a selected result.

E.g., SELECT * FROM TABLE1 WHERE [the number of rows of a (SELECT QUERY)] = 1;

1 Answers1

1

you can use COUNT(*) to get the count from the table.

 SELECT * FROM TABLE1 WHERE (SELECT COUNT(*) FROM sub_table) = 1 ;
James
  • 1,819
  • 2
  • 8
  • 21