oracle c 23 multiple update sql

Solutions on MaxInterview for oracle c 23 multiple update sql by the best coders in the world

showing results for - "oracle c 23 multiple update sql"
Mohamed-Ali
16 Mar 2018
1string sql1 = "BEGIN update Table1 set name = 'joe' where id = 10;",
2       sql2 = "update Table2 set country = 'usa' where region = 'americas';",
3       sql3 = "update Table3 set weather = 'sunny' where state = 'CA';",
4       sql4 = "update Table4 set engine = 'v8' where maker = 'benz'; END;";
5
6string sql = string.Format("{0}{1}{2}{3}",sql1,sql2,sql3,sql4);
7
8using (OracleConnection conn = new OracleConnection())
9using (OracleCommand cmdUpdate = new OracleCommand(sql, conn))
10{
11    conn.Open();
12    recs = cmdUpdate.ExecuteNonQuery();
13}
14