我需要使用此sql语句在数据库中包含时间 代码有效,但是时间不多了
string query = "UPDATE
Pri_loc_payment
SET
PAYMENT_STATUS_ID = " + status + $", SERVICE_STATUS = {ServiceStatus} PAYMENT_DATE = TO_DATE( '" + DateTime.Now.ToString("yyyy-MM-dd") + "', 'YYYY-MM-DD')
WHERE
ID in (" + concatIds + ")";
答案 0 :(得分:0)
尽管我同意之前的评论,但是如果您必须进行一些工作,则可以尝试以下操作:
string query = $"UPDATE Pri_loc_payment SET PAYMENT_STATUS_ID = 1, SERVICE_STATUS = { "SomeServiceStatus"}, PAYMENT_DATE = TO_DATE({DateTime.Now:yyyy-MM-dd}) WHERE ID in ({"concatIds"})";