建表语句:
create table wqx_XXX (
id integer not null primary key generated always as identity (start with 1 , increment 1),
name varchar(200) not null
)
<insert id="insert1'" parameterClass="eleDto">
insert into
wqx_XXX(name) values(#name#)
<selectKey resultClass="java.lang.String" keyProperty="id">
select IDENTITY_VAL_LOCAL() as id FROM sysibm.sysdummy1
</selectKey>
</insert>
本文介绍了一个简单的数据库操作示例,包括如何创建带有自增ID字段的表以及如何插入数据并获取自增ID。该示例使用了特定于数据库的SQL语法。
2180

被折叠的 条评论
为什么被折叠?



