Update SQL queries for tables creation