SQL scripts, modified