Can I replace the “Upgrade Network” with SQL query?

Can I replace the “Upgrade Network” with SQL query?