我不明白为什么,而不是列deptno上的数字 出现#
我是这方面的初学者,我正在读一本书“专家 甲骨文 “数据库体系结构”,然后我找到了一个需要创建该表的示例
也许这本书不适合初学者,但我仍然开始阅读
我使用Oracle 12 c r2
彼得,谢谢
SQL> create table dept
2 ( deptno number(2),
3 dname varchar2(14),
4 loc varchar2(13),
5 last_mod timestamp with time zone
6 default systimestamp
7 not null,
8 constraint dept_pk primary key(deptno)
9 )
10 ;
Table created.
SQL> insert into DEPT (DEPTNO, DNAME, LOC)
2 values(10, 'ACCOUNTING', 'NEW YORK')
3 ;
1 row created.
SQL> insert into DEPT (DEPTNO, DNAME, LOC)
2 values(20, 'RESEARCH', 'DALLAS');
1 row created.
SQL> insert into DEPT (DEPTNO, DNAME, LOC)
2 values(30, 'SALES', 'CHICAGO');
1 row created.
SQL> insert into DEPT (DEPTNO, DNAME, LOC)
2 values(40, 'OPERATIONS', 'BOSTON');
1 row created.
SQL> select * from dept;
DEPTNO DNAME LOC LAST_MOD
---------- ------------------------------ ------------- --------------------------------------------------
########## ACCOUNTING NEW YORK 28-NOV-18 01.29.06.149308 PM -05:00
########## RESEARCH DALLAS 28-NOV-18 01.29.20.001800 PM -05:00
########## SALES CHICAGO 28-NOV-18 01.29.40.491547 PM -05:00
########## OPERATIONS BOSTON 28-NOV-18 01.30.10.842314 PM -05:00