sql - 在dept表中,出现列错误deptno
问题描述
我不明白为什么,而不是列deptno 上出现的数字#
我是这方面的初学者,我正在阅读一本书“专家 Oracle 数据库架构”,我找到了一个需要创建此表的示例
也许这本书不适合初学者,但我还是开始读了
我使用 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
解决方案
推荐阅读
- iis - VisualSvn 服务器通过另一台计算机的 IIS 服务器
- javascript - Playwright - 如何获取 page.on('response') 承诺正文内容
- unity3d - 是否可以统一打开另一个 exe(例如命令提示符),例如自定义编辑器窗口中的内容?
- apache - TYPO3 10.4.21 只能通过其 id 访问的页面
- php - 如何将命令行传递给 Symfony 进程组件
- php - 循环 onchange 选择选项
- amazon-web-services - 如何在类似于 github 的 AWS 代码提交中执行状态检查
- java - Java Concurrency in Practice 示例中的指令可以在编译器优化期间重新排序吗
- ios - 如何在 Swift 中进行异步 api 调用
- flutter - 检查 Flutter / Dart 依赖项是否存在已知漏洞?