Rename a Table
来源:互联网 发布:论网络暴力英文 编辑:程序博客网 时间:2024/06/05 05:49
6. 6. 1. Renaming a Table
You rename a table using the RENAME statement.
SQL> -- create demo table
SQL> create table myTable(
2 id NUMBER(2),
3 value NUMBER(6,2)
4 )
5 /
Table created.
SQL>
SQL> -- prepare data
SQL> insert into myTable(ID, value)values (1,9)
2 /
1 row created.
SQL> insert into myTable(ID, value)values (2,2.11)
2 /
1 row created.
SQL> insert into myTable(ID, value)values (3,3.44)
2 /
1 row created.
SQL> insert into myTable(ID, value)values (4,-4.21)
2 /
1 row created.
SQL> insert into myTable(ID, value)values (5,10)
2 /
1 row created.
SQL> insert into myTable(ID, value)values (6,3)
2 /
1 row created.
SQL> insert into myTable(ID, value)values (7,-5.88)
2 /
1 row created.
SQL> insert into myTable(ID, value)values (8,123.45)
2 /
1 row created.
SQL> insert into myTable(ID, value)values (9,98.23)
2 /
1 row created.
SQL>
SQL> select * from myTable
2 /
ID VALUE
---------- ----------
1 9
2 2.11
3 3.44
4 -4.21
5 10
6 3
7 -5.88
8 123.45
9 98.23
9 rows selected.
SQL>
SQL>
SQL>
SQL> RENAME myTable TO myNewTable;
Table renamed.
SQL>
SQL> select * from myNewTable;
ID VALUE
---------- ----------
1 9
2 2.11
3 3.44
4 -4.21
5 10
6 3
7 -5.88
8 123.45
9 98.23
9 rows selected.
SQL>
SQL> -- clean the table
SQL> drop table myNewTable
2 /
Table dropped.
SQL>
- Rename a Table
- table -- rename
- ORACLE RENAME Table
- MySQL基础知识---------RENAME TABLE语法
- MySQL 的Rename Table语句
- truncate table AND rename table + create table测试
- alter table table_name1 rename to table_name2;
- MySQL重命名表(RENAME TABLE语句)
- MySQL重命名表(RENAME TABLE语句)
- Alter by Table Rename 与 Alter Table in Place
- Can rename table but can not truncate table
- rename
- rename
- rename
- rename
- rename
- rename()
- A. Table
- 把android framework源代码加入SDK进行调试(转)
- Linux Shell 常用命令与目录分区的学习总结
- 3.12 文件I/O_dup和dup2函数
- 创建和触发sql2005视图中的触发器
- 线程与进程的比较
- Rename a Table
- 在Oracle的存储过程中使用dblink调用远程存储过程备忘
- 毕业五年决定你的一生
- C语言的内嵌汇编
- 今天刚正式注册,来报个到。
- 关于店铺选址1
- 关键字explicit
- 软件开发者路线图:从学徒到高手
- 如果你已经过了20岁但还不到25岁