JOOQ如何将默认值添加到现有表中
以下DSL可以在现有表中添加新列,但我不知道如何在此DSL中添加默认值。
DSL.using(dialect).alterTable(table("tableName"))
.add(field(name("newColName"),VARCHAR(32).nullable(false)))
The below DSL can add new column with nullable to existing table, but i don't know how to add a default value in this DSL.
DSL.using(dialect).alterTable(table("tableName"))
.add(field(name("newColName"),VARCHAR(32).nullable(false)))
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它的工作方式与
nullable()
直接在类型上的工作方式相同。使用It works the same way as
nullable()
, directly on the type. Use