目录
在Mybatis中使用
在数据库管理工具中使用 now+100a
使用now() + #{index}a 其中那这个 #{index}是<foreach>标签里的循环出来的index
在Mybatis中使用
<insert id="batchInsert" parameterType="java.util.List">insert into uri(id,name,uri,code,property_id,ts)values<foreach collection="uriList" item="uri" separator="," index="index">(#{uri.id},#{uri.name},#{uri.uri},#{uri.code},#{uri.propertyId},now() + #{index}a)</foreach> </insert>
在数据库管理工具中使用 now+100a
INSERT INTO uri (
ts,
id,
name,
uri,
code,
property_id)
VALUES (
now+100a,
'erweersdfsds',
'P2',
'A2',
'P2',
'gtyja678-gty7-yui9-889o-11123ef9iuo0');