define schema='schema_name'
create table &schema..tblname (
col1name number constraint tblname_1_nn not null,
col2name char(n) constraint tblname_2_nn not null,
col3name varchar2(n) constraint tblname_3_nn not null,
constraint tblname_0_pk
primary key (col1name)
using index tablespace index_tspname
pctfree 5
initrans 1
maxtrans 255
storage (
initial 1k
minextents 1
maxextents unlimited
)
)
tablespace data_tspname
pctfree 5
initrans 1
maxtrans 255
storage (
initial 4k
minextents 1
maxextents unlimited
);
grant select, insert, update, delete
on &schema..tblname
to rolename1,
rolename2;
Oracle stores columns of CHAR type with a length field, the same as for variable length columns, so unlike other DBMSes , there is no advantage in space usage to using fixed-length CHAR rather than variable length. However, since comparison of fixed-length CHAR columns will provide for automatic padding the data type of Oracle columns should be either CHAR or VARCHAR2, as deemed appropriate for the data being stored in the column.
Last updated Wednesday March 7, 2007
Printer-friendly PDF* format:
You are currently viewing this page in XHTML 1 Style Sheet* format (* see Clicklets for more infomation). This document is also available in XHTML 1*XML*HTML 4*HTML 5 Style Sheet*HTML 5 XML*HTML 5 non-XML* XHTML 2* XHTML Mobile* WML Mobile* and printer-friendly PDF* formats. This is accomplished with Single Source Publishing, a content management system that uses templates in XSLT style sheets provided by XML Styles .com to transform the source content for various content delivery channels. There is also RDF* metadata that describes the content of this document.