在Android中使用SELECT SQL语句插入
我想在我的Android应用程序中执行以下参数化SQL语句:在Android中使用SELECT SQL语句插入,android,sql,Android,Sql,我想在我的Android应用程序中执行以下参数化SQL语句: String sql = "INSERT INTO orders(orderId, orderDate, " + "customerId, requiredDate, priceList, taxCode, discount, shipper, " + "freight, shipName, ahipAddress, shipCity, shipRegion, shipPostalCode, "
String sql = "INSERT INTO orders(orderId, orderDate, "
+ "customerId, requiredDate, priceList, taxCode, discount, shipper, "
+ "freight, shipName, ahipAddress, shipCity, shipRegion, shipPostalCode, "
+ "shipCountry, notes, custom) "
+ "SELECT(?, ?, "
+ "customerId, requiredDate, priceList, taxCode, discount, shipper, "
+ "freight, shipName, ahipAddress, shipCity, shipRegion, shipPostalCode, "
+ "shipCountry, notes, custom) " + "FROM orders WHERE _id=?";
我还需要知道插入是否由于唯一密钥冲突而失败。使用SQLiteDatabase对象有什么方法可以做到这一点吗?您得到的错误是什么?您真的读过这个问题吗?是的,我读过。您想知道插入是否失败。所以,我问你,你试过了吗。如果是这样,您得到的错误文本是什么?除了SQL语句外,我是否引用了任何代码?这应该给你一个线索。