首页 新闻 会员 周边

JPA创建postgresql数据库的表时怎么添加注释呢?

0
悬赏园豆:20 [待解决问题]

mysql是 @Column(name = "name", columnDefinition = "varchar(100) comment '注释'")
postgresql是什么做呢?

二小欧巴的主页 二小欧巴 | 初学一级 | 园豆:182
提问于:2018-12-01 14:13
< >
分享
所有回答(2)
0
create table session_log 
( 
   userid int not null, 
   phonenumber int
); 

----添加注释
---给字段添加注释 comment
on column session_log.userid is '用户id'; comment on column session_log.phonenumber is '电话号码';

----给表添加注释
comment on table session_log is '日志记录';

 

悟行 | 园豆:12559 (专家六级) | 2018-12-01 14:19
0

应该也是一样的

花儿为何那样红 | 园豆:81 (初学一级) | 2018-12-03 10:37
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册