added gentable.sql