Invert table structure