创建一个名字叫CREATE的表格
Kevin Zou
2011-8-29
如果想用数据库的关键字做为TABLE的名称,这是可以实现的。但是在创建,使用时要加上双引号。使用起来比较麻烦,我觉得还是不要这种特殊名称的表格为好。
例子:
SQL> create table create(id int); create table create(id int) * ERROR at line 1: ORA-00903: invalid table name
SQL> create table "create"(id int);
Table created.
SQL> select * from "create";
no rows selected
SQL> insert into "create" values(100);
1 row created.
SQL> commit;
Commit complete.
SQL> select * from "create";
ID ---------- 100
|
双引号""里的用户名、表名、列名,严格区分大小写,且可为关键字。
-THE END-
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/40239/viewspace-706134/
,如需转载,请注明出处,否则将追究法律责任。