Chi*_*rai 0 mysql sql odbc jdbc
我正在阅读这个问题如何确定 JAVA 中 jdbcTemplate 的 sql 查询类型?. 正确答案是,SELECT 查询可以以 aSELECT或 a开头WITH。
仅供参考,答案说:
// SELECT subqueries are irrelevant for the final result. So the command, the first verb is indicative of the result (int updateCount vs. ResultSet).
boolean isSqlSelect = sql.toUpperCase().startsWith("SELECT")
|| sql.toUpperCase().startsWith("WITH");
Run Code Online (Sandbox Code Playgroud)
所以,现在让我们说我有一个查询
SELECT id, name, email FROM users;
Run Code Online (Sandbox Code Playgroud)
问题
WITH?