Oracle Faq(ÈçºÎÔÚORACLEÖиü¸Ä±íµÄÁÐÃûºÍ˳Ðò )

5年以前  |  阅读数:963 次  |  编程语言:PHP 

ÈçÐeתÔØ£¬Çe×¢Ã÷³o´¦£¡
ÓùýORACLEµÄÈ˶¼ÖªµÀ£¬ÒªÏeÔÚORACLEÖиu¸Ä±iµÄÁÐÃuºÍ˳Ðo¿ÉÊÇÒ»¼þºÜ³ËoµÄÊ£¬ÏÂÃae¸ø´o¼ÒÌa¹(C)Ò»ÖÖ¼oµ¥µÄ½*¨¡£

SQL> select object_id from all_objects where owner='SCOTT' and object_name='T1';

OBJECT_ID
----------
6067
SQL> select obj#,col#,name from sys.col$ where obj#=6067;

OBJ# COL#
---------- ----------
NAME
------------------------------------------------------------
6067 1
ID

6067 2
NAME

SQL> update sys.col$ set name='NEW_ID' ,col#=3 where obj#=6067 and name='ID';

1 row updated.

SQL> update sys.col$ set name='MY_NAME',col#=1 where obj#=6067 and name='NAME';

1 row updated.

SQL> update sys.col$ set col#=2 where obj#=6067 and col#=3;

1 row updated.

SQL> commit;

Commit complete.

SQL> select * from scott.t1;

ID NAME
---------- --------------------
3 cheng
2 yong
1 xin
2 gototop
1 topcio
2 yongxin
1 cyx

7 rows selected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 128159368 bytes
Fixed Size 732808 bytes
Variable Size 117440512 bytes
Database Buffers 8388608 bytes
Redo Buffers 1597440 bytes
Database mounted.
Database opened.
SQL> select * from scott.t1;

MY_NAME NEW_ID
-------------------- ----------
cheng 3
yong 2
xin 1
gototop 2
topcio 1
yongxin 2
cyx 1

7 rows selected.

µ½´ËΪֹÎÒÃÇÒѾ­°ÑSCOTT.T1±iÖеÄÁÐÃuºÍ˳Ðo¶¼¸ø¸ÃÁË£¬Èç¹uÄaÖ»Ïe¸Ä±a˳Ðo¶ø²»Ïe¸Ä±aÁÐÃu£¬Ö»ÐeÔÙ½øÐÐUPDATE¾Í¿ÉÒÔÁË£¬Ö®ËuÒÔ²»ÄÜÒ»´ÎÍe³ÉÊÇÒoΪSYS.COL$ÖÐCOL#,NAME¶¼ÊÇUNIQUEµÄ¡£

ÕaÖÖ½¨ËaÈ»´aeÔÚÒ»¶¨çÏÕ£¬µ«¶ÔÓÚÌرð´oµÄ±iЧ¹uÊǺÜÃ÷ÏԵģ¬¶øÓÃÒ»°aµÄ½*¨½«ÐeÒª¸u¶aµÄ´ae´¢¿Õ¼a¡¢»Ø¹o¶ÎºÍʱ¼a¿ªÏu¡£

 相关文章:
PHP分页显示制作详细讲解
SSH 登录失败:Host key verification failed
获取IMSI
将二进制数据转为16进制以便显示
获取IMEI
文件下载
贪吃蛇
双位运算符
PHP自定义函数获取搜索引擎来源关键字的方法
Java生成UUID
发送邮件
年的日历图
提取后缀名
在Zeus Web Server中安装PHP语言支持
让你成为最历害的git提交人
Yii2汉字转拼音类的实例代码
再谈PHP中单双引号的区别详解
指定应用ID以获取对应的应用名称
Python 2与Python 3版本和编码的对比
php封装的page分页类完整实例