Creating tables with dynamic columns