oracle 创建表

Posted blog_xiao

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle 创建表相关的知识,希望对你有一定的参考价值。

--创建表

create
table browser_track( btId number not null , opend_id varchar2(50) not null, url_address varchar2(100) not null, params varchar2(50) null, stay_time number default 0 not null , look_time number default 0 not null , behavior_name varchar2(10) not null, behavior_id number not null, pbehavior_name varchar2(10) not null, pbehavior_id number not null, create_time timestamp not null, primary key (btId) ); --表注释 comment on table browser_track is 用户行为跟踪表; --字段注释 comment on column browser_track.btId is 主键; comment on column browser_track.opend_id is opend_id; comment on column browser_track.url_address is url地址; comment on column browser_track.params is 参数列表; comment on column browser_track.stay_time is 停留时间; comment on column browser_track.look_time is 浏览时间; comment on column browser_track.behavior_id is 动作id; comment on column browser_track.behavior_name is 动作名称; comment on column browser_track.pbehavior_name is 父动作名称; comment on column browser_track.pbehavior_id is 父动作id; comment on column browser_track.create_time is 创建时间; --索引 create index behavior_id on browser_track(behavior_id); select t.*,t.rowid from browser_track t; drop table browser_track;

 




以上是关于oracle 创建表的主要内容,如果未能解决你的问题,请参考以下文章

Oracle代码 规则 创建表 表空间 用户等

sql Oracle代码片段

Oracle-常用数据库对象笔记(片段)

oracle怎么创建表空间?

Oracle 创建数据库表用户及权限设置代码

Oracle中如何用命令创建表空间?