[Oracle/R]sql语句的引号

Oracle中,表名和列名要加双引号,字符值要加单引号,以下是R语言中相关语句:

sql = paste0('insert into "modelprediction" ("t_model", "t_road_id", "t_date", "t_risk") values ', "('NextDayMacro', '1',  to_date('",substr(Sys.time() ,0,10),"','YYYY-MM-DD'),'",pred$pred,"')")
dbSendUpdate(conn, sql)
dbGetQuery(conn, 'select * from "modelprediction"')
    原文作者:VincentJianshu
    原文地址: https://www.jianshu.com/p/d08ef1e52b51
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞