SELECT
    trim(rf.RDB$RELATION_NAME)||'.'||rf.RDB$FIELD_NAME AS FIELD_NAME
FROM
    RDB$RELATION_FIELDS rf
JOIN
    RDB$FIELDS f ON rf.RDB$FIELD_SOURCE = f.RDB$FIELD_NAME
WHERE
    rf.RDB$DEFAULT_SOURCE = 'DEFAULT ''NOW''';
	
	
select
    *
from(
SELECT
    r.RDB$RELATION_NAME AS TABLE_NAME
FROM
    RDB$RELATIONS r
WHERE
    NOT EXISTS (
        SELECT 1
        FROM
            RDB$RELATION_CONSTRAINTS rc
        WHERE
            rc.RDB$RELATION_NAME = r.RDB$RELATION_NAME
            AND rc.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY'
    )
    AND r.RDB$SYSTEM_FLAG = 0
ORDER BY
    r.RDB$RELATION_NAME
) where TABLE_NAME like 'TB%' or TABLE_NAME like 'TMP%'
