Added sql for other tables