右欄
歡迎您:游客!請先
登錄
或
注冊
風格
恢復默認設置
|
展區
文件集瀏覽
圖片集瀏覽
Flash瀏覽
音樂集瀏覽
電影集瀏覽
|
搜索
|
社區游戲中心
曙海教育集團論壇
→
開發語言培訓專區
→
Oracle數據庫
→ Oracle上機試驗報告
新的主題
投票帖
交易帖
小字報
下一主題 >>
<< 上一主題
共有
6778
人關注過本帖
樹形
打印
主題: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.03027 秒, 3 次數據查詢
主站蜘蛛池模板:
国产精品多人p群无码
|
国产凸凹视频一区二区
|
国产精品成人va在线观看入口
|
国内揄拍国内精品
|
国产精品爽爽ⅴa在线观看
|
国产福利一区二区
|
宝贝过来趴好张开腿让我看看
|
国产精品对白刺激久久久
|
国产无遮挡吃胸膜奶免费看视频
|
国产在线精品二区韩国演艺界
|
四虎影视在线影院www
|
全彩口工番日本漫画
|
亚洲欧美中文日韩在线v日本
|
内射一区二区精品视频在线观看
|
qvod激情视频在线观看
|
久久www成人看片
|
亚洲娇小性xxxx色
|
久久国产精品成人片免费
|
七次郎在线视频永久地址
|
99久久无色码中文字幕
|
黄色一级毛片看一级毛片
|
美国美女一级毛片免费全
|
狠狠综合亚洲综合亚洲色
|
欧洲一卡2卡3卡4卡免费观看
|
欧美成人精品第一区二区三区
|
最近日本中文字幕免费完整
|
最近免费观看高清韩国日本大全
|
日本高清com
|
夜夜爽免费888视频
|
国产欧美va欧美va香蕉在线
|
啊啊啊好爽在线观看
|
和前辈夫妇交换性3中文字幕
|
伊人久久大香线蕉综合影
|
你懂的中文字幕
|
久热免费在线视频
|
久久国产综合精品欧美
|
www久久com
|
色综合久久一区二区三区
|
欧美日韩亚洲国产千人斩
|
成人午夜看片在线观看
|
国产婷婷成人久久av免费高清
|