modified grant sql.