Subject Re: [firebird-support] create a table every year
Author Thomas Steinmaurer
> I would like to save the old records in a separate table every year. On the
> end of the year I would Copy the empty main-table to an new table named like
> "Backup" and the old year for example. The new backup table needs no
> triggers.
>
>
>
> How can I realize this?

Are you curious about the:

1) "every year" part, or
2) creating a structural identical table from an existing one

ad 1): The Firebird engine doesn't have a task scheduler / job engine
component included, thus you can use e.g. the OS task scheduling facility

ad 2): Firebird doesn't support something like CREATE TABLE ... AS
SELECT ... like Oracle (feel free to vote on:
http://tracker.firebirdsql.org/browse/CORE-796), so you have to query
the RDB$ system tables for the field names, data types etc.


Regards,
Thomas