您的位置:首页 > 其它

创建表的应用实例

2013-07-14 09:46 155 查看
SQL> create table zgk.person

  2  (personid varchar2(10),

  3  name varchar2(10)

  4  )

  5  tablespace longshen;

Table created.

SQL> create table scott.event

  2  (evtid varchar2(10),

  3  evtname varchar2(10)

  4  )

  5  tablespace users;

Table created.

查询一下是否创建成功:

SQL> select segment_name,tablespace_name,extents,blocks from dba_segments

  2  where owner='ZGK' and tablespace_name like 'LONG%';

SEGMENT_NA TABLESPACE_N    EXTENTS     BLOCKS

---------- ------------ ---------- ----------

PERSON     LONGSHEN              1        128

 

SQL> select table_name,tablespace_name from dba_tables

  2  where owner='SCOTT' and tablespace_name like 'USERS';

TABLE_NAME                     TABLESPACE_N

------------------------------ ------------

DEPT                           USERS

EMP                            USERS

BONUS                          USERS

SALGRADE                       USERS

STUDENT                        USERS

EVENT                          USERS

6 rows selected.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: