大拿在帮个忙。pgsql问题。

japt88_115656292 2010-05-07 06:11:25
表名字 test
ID bigserial PRIMARY KEY 标识
Account Varchar(50) not null 用户帐号
AddTime timestamp not null default localtimestamp 加入时间
Comment Text 注释
AreaCode Varchar(10) 地区编码

这个是文档里面的。但是里面没数据,我web部分不太好做。我手动老是插不进去。 谁可以帮我写个sql啊,随便插一条数据就行。
...全文
75 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
japt88_115656292 2010-05-09
  • 打赏
  • 举报
回复
呵呵啊呵呵啊呵呵啊呵呵啊呵呵啊呵呵啊呵呵啊呵呵啊
ACMAIN_CHM 2010-05-07
  • 打赏
  • 举报
回复
iihero 2010-05-07
  • 打赏
  • 举报
回复
给你一个完整的示例吧:
iihero=# create table t2(id bigserial primary key, account varchar(50) not null,
iihero(# addtime timestamp not null default localtimestamp, comment text, areacode varchar(10));
NOTICE: CREATE TABLE will create implicit sequence "t2_id_seq" for serial column "t2.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t2_pkey" for table "t2"
CREATE TABLE
iihero=# select * from t2;
id | account | addtime | comment | areacode
----+---------+---------+---------+----------
(0 rows)


iihero=# insert into t2(account, comment, areacode) values('iihero', 'sample', '100038');
INSERT 0 1
iihero=# select * from t2;
id | account | addtime | comment | areacode
----+---------+-------------------------+---------+----------
1 | iihero | 2010-05-07 19:17:27.234 | sample | 100038
(1 row)


iihero=#
mackzhaozhonggang 2010-05-07
  • 打赏
  • 举报
回复
insert into test values (标识,用户帐号,加入时间,注释,地区编码)




japt88_115656292 2010-05-07
  • 打赏
  • 举报
回复
插进去了。谁来给谁分。 下次还我哦,只来一个

57,065

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧