表名字 test
ID bigserial PRIMARY KEY 标识
Account Varchar(50) not null 用户帐号
AddTime timestamp not null default localtimestamp 加入时间
Comment Text 注释
AreaCode Varchar(10) 地区编码这个是文档里面的。但是里面没数据,我web部分不太好做。我手动老是插不进去。 谁可以帮我写个sql啊,随便插一条数据就行。
ID bigserial PRIMARY KEY 标识
Account Varchar(50) not null 用户帐号
AddTime timestamp not null default localtimestamp 加入时间
Comment Text 注释
AreaCode Varchar(10) 地区编码这个是文档里面的。但是里面没数据,我web部分不太好做。我手动老是插不进去。 谁可以帮我写个sql啊,随便插一条数据就行。
解决方案 »
- 面试之sql,大家进来看看怎么做?
- 安装dzx1.5时出现Can't connect to MySQL server on 'localhost' (10061)
- mysql如何显示出现异常的表?怎么修复全部异常表?
- 请教php调用mysql存储过程问题!谢谢指点
- 求一个sql语句(千万级别)
- mysql无法启动 [ERROR] /usr/local/mysql/libexec/mysqld: unknown variable 'uesr=mysql'
- 如何取得update了record的primary key id?
- sql高手进
- 如何得到数据库中所有的表名
- 奇怪的LOWER问题
- double(18,2)与numeric(18,2)这两种写法有区别吗?
- MySQL菜鸟问题···
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=#