i have database with tables like these:
t_09_students
t_10_students
t_11_students
where 09, 10, 11 show year and this table will increase over the year.

how do i select all the data from the tables (using union) with flexible table name?

ask me, if it is not clear yet

You'll need some scripting, so perhaps writing a stored procedure is required.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.