CONNECT mojabaza.fdb user 'SYSDBA' PASSWORD 'masterkey;

SELECT 'define relation new.', RDB$RELATION_NAME,
 ' based on relation old.',  RDB$RELATION_NAME, ';'
FROM RDB$RELATIONS where RDB$RELATION_NAME 
NOT STARTING WITH 'RDB$';
COMMIT;

SELECT 'new.', RDB$RELATION_NAME, ' = old.',  
RDB$RELATION_NAME, ';'
FROM RDB$RELATIONS WHERE RDB$RELATION_NAME 
NOT STARTING WITH 'RDB$';
