1

I have tables like A_0, A_1,...A_9, and I want to count all rows number or delete them:

select count(*) from A_*;
delete from A_*;

Is wildcard support or should i walk around another way?

whi
  • 2,685
  • 6
  • 33
  • 40

1 Answers1

0

select won't target several different tables , unless you Join/Union them to form a middle step result.

like this:

select
    count(*)
from 
    ( select * from A1 
      union all select * from A2 ....)

no table wild card supported in sql

zinking
  • 5,561
  • 5
  • 49
  • 81