久久中文视频-久久中文网-久久中文亚洲国产-久久中文字幕久久久久-亚洲狠狠成人综合网-亚洲狠狠婷婷综合久久久久
右欄
歡迎您:游客!請先
登錄
或
注冊
風格
恢復默認設置
|
展區
文件集瀏覽
圖片集瀏覽
Flash瀏覽
音樂集瀏覽
電影集瀏覽
|
搜索
|
社區游戲中心
曙海教育集團論壇
→
開發語言培訓專區
→
Oracle數據庫
→ Oracle上機試驗報告
新的主題
投票帖
交易帖
小字報
下一主題 >>
<< 上一主題
共有
6962
人關注過本帖
樹形
打印
主題:Oracle上機試驗報告
wangxinxin
小
大
1樓
個性首頁
|
博客
|
信息
|
搜索
|
郵箱
|
主頁
|
UC
加好友
發短信
等級:青蜂俠
帖子:
1393
積分:14038
威望:0
精華:0
注冊:
2010-11-12 11:08:23
Oracle上機試驗報告
Post By:2010-12-11 10:58:44
以下內容含腳本,或可能導致頁面不正常的代碼
環境<font face="宋體 ">:</font><font face="Times New="New" Roman="Roman" ">SQLPlus</font><font face="宋體 ">下</font> <table class="t_table" cellspacing="0"> <tbody> <tr> <td width="609"><font size="3">SQL> select * from v$version;</font> <font size="3">BANNER</font> <font size="3">----------------------------------------------------------------</font> <font size="3">Oracle9i Release 9.2.0.1.0 - Production</font> <font size="3">PL/SQL Release 9.2.0.1.0 - Production</font> <font size="3">CORE 9.2.0.1.0 Production</font> <font size="3">TNS for 32-bit Windows: Version 9.2.0.1.0 - Production</font> <font size="3">NLSRTL Version 9.2.0.1.0 - Production</font> </td></tr></tbody></table><font face="Times New="New" Roman="Roman" "></font> <strong><font face="宋體 ">問題一:</font></strong> <strong><font face="宋體 ">問題名稱</font></strong><font face="宋體 ">:輸入字符</font><font face="Times New="New" Roman="Roman" ">&</font><font face="宋體 ">的問題</font> <strong><font face="宋體 ">問題描述</font></strong><font face="宋體 ">:在</font><font face="Times New="New" Roman="Roman" ">INSERT INTO DEPARTMENT VALUES('4','Math & Science','444');</font><font face="宋體 ">插入該條記錄的時候發現</font><font face="Times New="New" Roman="Roman" ">&</font><font face="宋體 ">及后面的字符被忽略掉了,不能正確插入(</font><font face="Times New="New" Roman="Roman" ">department</font><font face="宋體 ">表已建立,且記錄符合約束)。</font> <strong><font face="宋體 ">問題分析</font></strong><font face="宋體 ">:在</font><font face="Times New="New" Roman="Roman" ">Oracle9i</font><font face="宋體 ">中</font><font face="Times New="New" Roman="Roman" ">&</font><font face="宋體 ">是有特殊含義的字符,默認狀態其功能為指出一個變量,故不能正確插入,若想輸入必須禁用此功能或者繞過此功能。</font> <strong><font face="宋體 ">問題<span class="t_tag" onclick="tagshow(event)" href="tag.php?name=%BD%E2%BE%F6">解決</span></font></strong><font face="宋體 ">:經過檢索資料以及實驗發現有四種方法可以解決該問題。</font> <font face="Times New="New" Roman="Roman" "></font> <strong><font face="宋體 ">解決方法</font><font face="Times New="New" Roman="Roman" ">1</font></strong><font face="宋體 ">:在</font><font face="Times New="New" Roman="Roman" ">SQLPlus</font><font face="宋體 ">中使用</font><font face="Times New="New" Roman="Roman" ">set scan off</font><font face="宋體 ">命令關閉輸入檢測</font> <table class="t_table" cellspacing="0"> <tbody> <tr> <td width="595"><font size="3"> SQL>set scan off</font> <font size="3">SQL>INSERT INTO DEPARTMENT VALUES('4','Math & Science','444');</font> <font size="3"><font face="宋體 ">已創建</font> 1 <font face="宋體 ">行。</font></font> <font size="3">SQL> select * from department;</font> <font size="3"> </font><font size="3">DEPTID DEPTNAME FACULTYID</font> <font size="3">---------- -------------------- ----------</font> <font size="3"> 4 Math & Science 444</font> </td></tr></tbody></table><font face="Times New="New" Roman="Roman" "> </font> <strong><font face="宋體 ">解決方法</font><font face="Times New="New" Roman="Roman" ">2</font></strong><font face="宋體 ">:在</font><font face="Times New="New" Roman="Roman" ">SQLPlus</font><font face="宋體 ">中利用</font><font face="Times New="New" Roman="Roman" ">set define off</font><font face="宋體 ">命令關閉定義在符號</font><font face="Times New="New" Roman="Roman" ">&</font><font face="宋體 ">上的功能</font> <table class="t_table" cellspacing="0"> <tbody> <tr> <td width="595"><font size="3">SQL> set scan on</font> <font size="3">SQL> truncate table department;</font> <font size="3"><font face="宋體 ">表已截掉。</font></font> <font size="3">SQL> set define off</font> <font size="3">SQL>INSERT INTO DEPARTMENT VALUES('4','Math & Science','444');</font> <font size="3"><font face="宋體 ">已創建</font> 1 <font face="宋體 ">行。</font></font> <font size="3">SQL> select * from department;</font> <font size="3"> </font> <font size="3">DEPTID DEPTNAME FACULTYID</font> <font size="3">---------- -------------------- ----------</font> <font size="3"> 4 Math & Science 444</font> </td></tr></tbody></table><font face="Times New="New" Roman="Roman" "></font> <font face="Times New="New" Roman="Roman" "> </font><strong><font face="宋體 ">解決方法</font><font face="Times New="New" Roman="Roman" ">3</font></strong><font face="宋體 ">:利用變量輸入來繞過</font><font face="Times New="New" Roman="Roman" ">&</font><font face="宋體 ">功能</font> <table class="t_table" cellspacing="0"> <tbody> <tr> <td width="595"><font size="3">SQL> set define on</font> <font size="3">SQL> truncate table department;</font> <font size="3"><font face="宋體 ">表已截掉。</font></font> <font size="3">SQL>INSERT INTO DEPARTMENT VALUES('4',&MAJOR,'444');</font> <font size="3"><font face="宋體 ">輸入</font> major <font face="宋體 ">的值</font>: 'Math & Science'</font> <font size="3"><font face="宋體 ">原值</font>1: INSERT INTO DEPARTMENT VALUES('4',&MAJOR,'444')</font> <font size="3"><font face="宋體 ">新值</font>1: INSERT INTO DEPARTMENT VALUES('4','Math & Science','444')</font> <font size="3"><font face="宋體 ">已創建</font> 1 <font face="宋體 ">行。</font></font> <font size="3">SQL> select * from department;</font><font size="3"> DEPTID DEPTNAME FACULTYID</font> <font size="3">---------- -------------------- ----------</font><font size="3"> 4 Math & Science 444</font> </td></tr></tbody></table><font face="Times New="New" Roman="Roman" "></font> <strong><font face="宋體 ">解決方法</font><font face="Times New="New" Roman="Roman" ">4</font></strong><font face="宋體 ">:用</font><font face="Times New="New" Roman="Roman" ">chr</font><font face="宋體 ">函數來替換</font><font face="Times New="New" Roman="Roman" ">'&'</font><font face="宋體 ">字符</font> <table class="t_table" cellspacing="0"> <tbody> <tr> <td width="595"><font size="3">SQL> truncate table department;</font> <font size="3"><font face="宋體 ">表已截掉。</font></font> <font size="3">SQL> select ascii('&') from dual;</font> <font size="3">ASCII('&')</font> <font size="3">----------</font> <font size="3"> 38</font> <p align="left"><font size="3">SQL>INSERT INTO DEPARTMENT VALUES('4','Math '||chr(38)||' Science','444');</font> <font size="3"><font face="宋體 ">已創建</font> 1 <font face="宋體 ">行。</font></font> <font size="3">SQL> select * from department;</font><font size="3"> DEPTID DEPTNAME FACULTYID</font> <font size="3">---------- -------------------- ----------</font> <font size="3"> 4 Math & Science 444</font> </td></tr></tbody></table><font face="Times New="New" Roman="Roman" "></font><strong><font face="宋體 ">問題總結</font></strong><font face="宋體 ">:在上述問題的解決方法中方法</font><font face="Times New="New" Roman="Roman" ">1</font><font face="宋體 ">與方法</font><font face="Times New="New" Roman="Roman" ">2</font><font face="宋體 ">屬于</font><font face="Times New="New" Roman="Roman" ">SQLPlus</font><font face="宋體 ">命令類型,且只能用于</font><font face="Times New="New" Roman="Roman" ">SQLPlus</font><font face="宋體 ">環境中,通用性不夠。方法</font><font face="Times New="New" Roman="Roman" ">3</font><font face="宋體 ">需要人機交互,不適合<span class="t_tag" onclick="tagshow(event)" href="tag.php?name=%CF%B5%CD%B3">系統</span>的大規模的記錄。方法</font><font face="Times New="New" Roman="Roman" ">4</font><font face="宋體 ">是函數法,通用性與批處理能力都不錯,只是在可讀性方面差點。</font> <font face="Times New="New" Roman="Roman" "></font> <font face="Times New="New" Roman="Roman" "></font> <font face="Times New="New" Roman="Roman" "> B06060314</font> <font face="Times New="New" Roman="Roman" "> </font><font face="宋體 ">davelv</font>
說明:
上面顯示的是代碼內容。您可以先檢查過代碼沒問題,或修改之后再運行.
支持
(
0
)
中立
(
0
)
反對
(
0
)
單帖管理
舉報帖子
使用道具
|
引用
|
回復
下一主題 >>
<< 上一主題
返回版面帖子列表
Oracle上機試驗報告
回復標題:
上傳附件:
簽名
:
不顯示
顯示
RSS2.0
Xhtml無圖版
Xslt無圖版
Copyright © 2000 - 2009
曙海
教育集團
Powered By
曙海教育集團
Version 2.2
頁面執行時間 0.01563 秒, 3 次數據查詢
主站蜘蛛池模板:
成人人免费夜夜视频观看
|
欧美一级看片免费观看视频在线
|
久久久久久久久中文字幕
|
xxx本日
|
欧美精品hdvideosex4k
|
欧美亚洲另类在线
|
成人区精品一区二区不卡亚洲
|
国产aaa级一级毛片 国产aaa毛片
|
手机在线免费看毛片
|
欧美aa一级
|
国产精品亚洲第一区二区三区
|
欧美日韩国产亚洲一区二区三区
|
成人免费在线观看视频
|
欧洲欧美成人免费大片
|
一级毛片视频播放
|
日韩一级在线视频
|
欧美视频一
|
欧美特黄一区二区三区
|
欧美区一区二区三
|
成人免费视频网站
|
国产专区在线
|
日本成人中文字幕
|
国产欧美日韩不卡一区二区三区
|
日韩在线无
|
日本高清在线不卡
|
国产一二三区在线观看
|
韩国一级永久免费观看网址
|
成人免费看黄网址
|
国产成人精品午夜免费
|
韩国精品一区视频在线播放
|
欧美一级别
|
国产欧美日韩高清专区手机版
|
久9这里精品免费视频
|
亚洲精品国产美女在线观看
|
国产亚洲欧美一区二区
|
亚洲国产精选
|
欧美日韩精品在线播放
|
手机看福利片
|
伊人短视频
|
国产黄三级三·级三级
|
国产一区二区精品
|