clojure jdbc: how to insert into a table with a sp

2019-06-20 14:14发布

问题:

In the url for jdbc clojure http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html

It gives the following example to insert into a table

(jdbc/insert! db-spec :table {:col1 42 :col2 "123"}) ;; Create

But for database like postgresql, it could have a non-public schema, suppose I have created a schema like template, then how to insert into template.mytable?

回答1:

Just specify the table name as :template.mytable, or as the string "template.mytable".



标签: jdbc clojure