亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ch20.htm

?? Learn SQL in an easy way...
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD>		<TITLE>Teach Yourself SQL in 21 Days, Second Edition -- Ch 20 -- SQL*Plus</TITLE></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF"><CENTER><H1><IMG SRC="../buttonart/sams.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM" BORDER="0"><BR><FONT COLOR="#000077">Teach Yourself SQL in 21 Days, Second Edition</FONT></H1></CENTER><CENTER><P><A HREF="../ch19/ch19.htm"><IMG SRC="../buttonart/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch21/ch21.htm"><IMGSRC="../buttonart/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../buttonart/contents.gif" WIDTH="128"HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A> <HR></CENTER><CENTER><H1><FONT COLOR="#000077">- Day 20 -<BR>SQL*Plus</FONT></H1></CENTER><H2><FONT COLOR="#000077">Objectives</FONT></H2><P>Today you will learn about SQL*Plus, the SQL interface for Oracle's RDBMS. Bythe end of Day 20, you will understand the following elements of SQL*Plus:</P><UL>	<LI>How to use the SQL*Plus buffer<BR>	<BR>		<LI>How to format reports attractively	<P>	<LI>How to manipulate dates	<P>	<LI>How to make interactive queries	<P>	<LI>How to construct advanced reports<BR>	<BR>		<LI>How to use the powerful <TT>DECODE</TT> function</UL><H2><FONT COLOR="#000077">Introduction</FONT></H2><P>We are presenting SQL*Plus today because of Oracle's dominance in the relationaldatabase market and because of the power and flexibility SQL*Plus offers to the databaseuser. SQL*Plus resembles Transact-SQL (see Day 19, &quot;Transact-SQL: An Introduction&quot;)in many ways. Both implementations comply with the ANSI SQL standard for the mostpart, which is still the skeleton of any implementation.</P><P>SQL*Plus commands can enhance an SQL session and improve the format of queriesfrom the database. SQL*Plus can also format reports, much like a dedicated reportwriter. SQL*Plus supplements both standard SQL and PL/SQL and helps relational databaseprogrammers gather data that is in a desirable format.<H2><FONT COLOR="#000077">The SQL*Plus Buffer</FONT></H2><P>The SQL*Plus buffer is an area that stores commands that are specific to yourparticular SQL session. These commands include the most recently executed SQL statementand commands that you have used to customize your SQL session, such as formattingcommands and variable assignments. This buffer is like a short-term memory. Hereare some of the most common SQL buffer commands:<UL>	<LI><TT>LIST line_number</TT>--Lists a line from the statement in the buffer and	designates it as the current line.	<P>	<LI><TT>CHANGE/old_value/new_value</TT>--Changes <TT>old_value</TT> to <TT>new_value</TT>	on the current line in the buffer.	<P>	<LI><TT>APPEND text</TT>--Appends <TT>text</TT> to the current line in the buffer.	<P>	<LI><TT>DEL</TT>-- Deletes the current line in the buffer.	<P>	<LI><TT>SAVE newfil</TT>e--Saves the SQL statement in the buffer to a file.	<P>	<LI><TT>GET filename</TT>--Gets an SQL file and places it into the buffer.	<P>	<LI>/--Executes the SQL statement in the buffer.</UL><P>We begin with a simple SQL statement:</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>select *</B>  2 <B> from products</B>  3  <B>where unit_cost &gt; 25;</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">PRO PRODUCT_NAME                   UNIT_COST--- ------------------------------ ---------P01 MICKEY MOUSE LAMP                  29.95P06 SQL COMMAND REFERENCE              29.99P07 BLACK LEATHER BRIEFCASE            99.99</FONT></PRE><P>The <TT>LIST</TT> command lists the most recently executed SQL statement in thebuffer. The output will simply be the displayed statement.</P><PRE><FONT COLOR="#0066FF">SQL&gt;<B> list</B>  1  select *  2  from products  3* where unit_cost &gt; 25</FONT></PRE><H5>ANALYSIS:</H5><P>Notice that each line is numbered. Line numbers are important in the buffer; theyact as pointers that enable you to modify specific lines of your statement usingthe SQL*PLUS buffer. The SQL*Plus buffer is not a full screen editor; after you hitEnter, you cannot use the cursor to move up a line, as shown in the following example.</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt;<B> select *</B>  2  <B>from products</B>  3  <B>where unit_cost &gt; 25</B>  4 <B> /</B></FONT></PRE><BLOCKQUOTE>	<P><HR><FONT COLOR="#000077"><B>NOTE:</B></FONT><B> </B>As with SQL commands, you may issue	SQL*Plus commands in either uppercase or lowercase. <HR></P>	<P><HR><FONT COLOR="#000077"><B>TIP:</B></FONT><B> </B>You can abbreviate most SQL*Plus	commands; for example, <TT>LIST</TT> can be abbreviated as <TT>l</TT>. <HR></BLOCKQUOTE><P>You can move to a specific line from the buffer by placing a line number afterthe <TT>l</TT>:</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt;<B> l3</B>  3* where unit_cost &gt; 25</FONT></PRE><H5>ANALYSIS:</H5><P>Notice the asterisk after the line number 3. This asterisk denotes the currentline number. Pay close attention to the placement of the asterisk in today's examples.Whenever a line is marked by the asterisk, you can make changes to that line.</P><P>Because you know that your current line is 3, you are free to make changes. Thesyntax for the <TT>CHANGE</TT> command is as follows:</P><H5>SYNTAX:</H5><PRE><FONT COLOR="#0066FF">CHANGE/old_value/new_value        </FONT></PRE><P><FONT COLOR="#000000">or</FONT><FONT COLOR="#0066FF"></FONT><PRE><FONT COLOR="#0066FF">C/old_value/new_value</FONT></PRE><H5><FONT COLOR="#000000">INPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">SQL&gt;<B> c/&gt;/&lt;</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">  3* where unit_cost &lt; 25</FONT></PRE><H5><FONT COLOR="#000000">INPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>l</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">  1  select *  2  from products  3* where unit_cost &lt; 25</FONT></PRE><H5>ANALYSIS:</H5><P>The greater than sign (<TT>&gt;</TT>) has been changed to less than (<TT>&lt;</TT>)on line 3. Notice after the change was made that the newly modified line was displayed.If you issue the <TT>LIST</TT> command or <TT>l</TT>, you can see the full statement.Now execute the statement:</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; /</FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">PRO PRODUCT_NAME                   UNIT_COST--- ------------------------------ ---------P02 NO 2 PENCILS - 20 PACK              1.99P03 COFFEE MUG                          6.95P04 FAR SIDE CALENDAR                   10.5P05 NATURE CALENDAR                    12.99</FONT></PRE><H5>ANALYSIS:</H5><P>The forward slash at the <TT>SQL&gt;</TT> prompt executes any statement that isin the buffer.</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>l</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">  1  select *  2  from products  3* where unit_cost &lt; 25</FONT></PRE><P>Now, you can add a line to your statement by typing a new line number at the <TT>SQL&gt;</TT>prompt and entering text. After you make the addition, get a full statement listing.Here's an example:</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt;<B> 4 order by unit_cost</B>SQL&gt; <B>1</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">  1  select *  2  from products  3  where unit_cost &lt; 25  4* order by unit_cost</FONT></PRE><H5>ANALYSIS:</H5><P>Deleting a line is easier than adding a line. Simply type DEL 4 at the <TT>SQL&gt;</TT>prompt to delete line 4. Now get another statement listing to verify that the lineis gone.</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; DEL4SQL&gt; l</FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">  1  select *  2  from products  3* where unit_cost &lt; 25</FONT></PRE><P>Another way to add one or more lines to your statement is to use the <TT>INPUT</TT>command. As you can see in the preceding list, the current line number is 3. At theprompt type input and then press Enter. Now you can begin typing text. Each timeyou press Enter, another line will be created. If you press Enter twice, you willobtain another <TT>SQL&gt;</TT> prompt. Now if you display a statement listing, asin the following example, you can see that line 4 has been added.</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>input</B>  4i   <B>and product_id = 'P01'</B>  5iSQL&gt; <B>l</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">  1  select *  2  from products  3  where unit_cost &lt; 25  4    and product_id = 'P01'  5* order by unit_cost</FONT></PRE><P>To append text to the current line, issue the <TT>APPEND</TT> command followedby the text. Compare the output in the preceding example--the current line numberis 5--to the following example.</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>append  desc</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">  5* order by unit_cost desc</FONT></PRE><P>Now get a full listing of your statement:</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt;<B> l</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">  1  select *  2  from products  3  where unit_cost &lt; 25  4    and product_id = 'P01'  5* order by unit_cost desc</FONT></PRE><P>Suppose you want to wipe the slate clean. You can clear the contents of the SQL*Plusbuffer by issuing the command <TT>CLEAR</TT> <TT>BUFFER</TT>. As you will see later,you can also use the <TT>CLEAR</TT> command to clear specific settings from the buffer,such as column formatting information and computes on a report.</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>clear buffer</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">buffer cleared</FONT></PRE><H5><FONT COLOR="#000000">INPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>l</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF">No lines in SQL buffer.</FONT></PRE><H5>ANALYSIS:</H5><P>Obviously, you won't be able to retrieve anything from an empty buffer. You aren'ta master yet, but you should be able to maneuver with ease by manipulating your commandsin the buffer.<H2><FONT COLOR="#000077">The DESCRIBE Command</FONT></H2><P>The handy <TT>DESCRIBE</TT> command enables you to view the structure of a tablequickly without having to create a query against the data dictionary.</P><H5>SYNTAX:</H5><PRE><FONT COLOR="#0066FF">DESC[RIBE] table_name</FONT></PRE><P>Take a look at the two tables you will be using throughout the day.</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>describe orders</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF"> Name                            Null?    Type ------------------------------- -------- ---- ORDER_NUM                       NOT NULL NUMBER(2) CUSTOMER                        NOT NULL VARCHAR2(30) PRODUCT_ID                      NOT NULL CHAR(3) PRODUCT_QTY                     NOT NULL NUMBER(5) DELIVERY_DATE                            DATE</FONT></PRE><P>The following statement uses the abbreviation <TT>DESC</TT> instead of <TT>DESCRIBE</TT>:</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>desc products</B></FONT></PRE><H5><FONT COLOR="#000000">OUTPUT:</FONT></H5><PRE><FONT COLOR="#0066FF"> Name                            Null?    Type ------------------------------- -------- ---- PRODUCT_ID                      NOT NULL VARCHAR2(3) PRODUCT_NAME                    NOT NULL VARCHAR2(30) UNIT_COST                       NOT NULL NUMBER(8,2)</FONT></PRE><H5>ANALYSIS:<TT></TT></H5><P><TT>DESC</TT> displays each column name, which columns must contain data (<TT>NULL</TT>/<TT>NOTNULL</TT>), and the data type for each column. If you are writing many queries, youwill find that few days go by without using this command. Over a long time, thiscommand can save you many hours of programming time. Without <TT>DESCRIBE</TT> youwould have to search through project documentation or even database manuals containinglists of data dictionary tables to get this information.<H2><FONT COLOR="#000077">The SHOW Command</FONT></H2><P>The <TT>SHOW</TT> command displays the session's current settings, from formattingcommands to who you are. <TT>SHOW ALL</TT> displays all settings. This discussioncovers some of the most common settings.</P><H5>INPUT:</H5><PRE><FONT COLOR="#0066FF">SQL&gt; <B>show all</B></FONT></PRE>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
综合欧美一区二区三区| 亚瑟在线精品视频| 中文字幕av资源一区| 中文字幕精品在线不卡| 中文字幕亚洲欧美在线不卡| 国产精品入口麻豆九色| 一区二区成人在线观看| 另类成人小视频在线| 99国内精品久久| 久久嫩草精品久久久精品一| 亚洲精品亚洲人成人网在线播放| 亚洲午夜久久久久久久久久久| 精品一区二区三区在线播放| 91猫先生在线| 亚洲最大色网站| 国产高清久久久久| 日韩一区二区三区在线观看| 亚洲美女偷拍久久| 成人精品高清在线| 久久先锋影音av| 狠狠色狠狠色综合| 色激情天天射综合网| 国产精品麻豆一区二区| 激情六月婷婷久久| 欧美一区二区三区思思人| 亚洲一区在线看| 欧美日韩在线一区二区| 中文字幕日韩精品一区| 成人一区二区三区视频在线观看 | 国产成人精品免费一区二区| 制服丝袜中文字幕亚洲| 五月婷婷激情综合网| 91福利在线看| 亚洲成人资源网| 欧美一区午夜精品| 图片区小说区国产精品视频| 欧美日韩和欧美的一区二区| 黄网站免费久久| 欧美精品一区二区三区蜜桃视频| 久久99精品国产91久久来源| 国产欧美一区二区三区在线看蜜臀 | 国内精品嫩模私拍在线| 久久亚洲一区二区三区四区| 成人免费视频一区| 亚洲成人av福利| 久久久亚洲精品一区二区三区 | 在线一区二区三区四区| 日韩精品成人一区二区在线| 国产精品毛片大码女人| 日韩欧美在线不卡| 丁香婷婷综合网| 美女一区二区三区在线观看| 亚洲精品午夜久久久| 精品成人在线观看| 制服丝袜亚洲精品中文字幕| 91丝袜美女网| bt欧美亚洲午夜电影天堂| 麻豆免费看一区二区三区| 亚洲成人一区二区| 亚洲一区二区在线播放相泽| 成人欧美一区二区三区黑人麻豆 | 91精品国产综合久久久久久久久久| 成人黄色软件下载| bt欧美亚洲午夜电影天堂| 美国精品在线观看| 另类的小说在线视频另类成人小视频在线 | 成人综合在线网站| 国产成人啪免费观看软件 | 成人avav在线| 99久久久精品| 色悠悠亚洲一区二区| 99久久国产综合色|国产精品| 成人av高清在线| 99久久国产综合精品麻豆| 91麻豆免费看| 91精品国产入口在线| 日韩精品一区二区在线观看| 欧美一区二区三区视频免费| 欧美日韩一二三| 精品99一区二区三区| 久久久高清一区二区三区| 欧美国产一区二区在线观看| 日韩伦理免费电影| 精品亚洲欧美一区| 色综合久久精品| 久久一夜天堂av一区二区三区| 欧美激情在线免费观看| 日韩经典中文字幕一区| 粉嫩av一区二区三区| 欧美电影一区二区| 亚洲婷婷国产精品电影人久久| 免费欧美在线视频| 91亚洲精品乱码久久久久久蜜桃| 欧美另类久久久品| 亚洲一区二区高清| 成人一区二区视频| 国产亚洲精品福利| 免费在线看成人av| 欧美日韩日日摸| 亚洲综合无码一区二区| www.亚洲在线| 欧美国产精品一区| 国产精品伊人色| 国产欧美一区二区精品性色超碰| 久久精品av麻豆的观看方式| 欧美男人的天堂一二区| 丝袜诱惑亚洲看片| 日韩亚洲欧美中文三级| 午夜视黄欧洲亚洲| 日韩欧美中文字幕精品| 国产经典欧美精品| 久久嫩草精品久久久精品一| 成人免费看视频| 亚洲免费伊人电影| 欧美日韩情趣电影| 狠狠色综合色综合网络| 欧美国产日韩一二三区| 欧美精品一二三| 国内精品视频一区二区三区八戒| 久久久欧美精品sm网站| 色诱视频网站一区| 日韩av高清在线观看| 国产精品情趣视频| 欧美一区二区三区免费大片 | 欧美午夜一区二区三区免费大片| 国产精品成人免费| 69久久夜色精品国产69蝌蚪网| 国模一区二区三区白浆| 一区二区在线看| 久久久久国产精品厨房| 欧美日韩久久久| 91麻豆国产精品久久| 久久99精品视频| 一区二区在线电影| 国产婷婷色一区二区三区四区| 欧美性大战久久| 在线视频你懂得一区| 欧日韩精品视频| 色综合色综合色综合色综合色综合| 久久精品免费看| 日韩国产欧美在线播放| 亚洲男人的天堂网| 国产精品高潮久久久久无| 久久男人中文字幕资源站| 日韩精品中文字幕在线不卡尤物| 欧美高清激情brazzers| 欧美色中文字幕| 欧美日韩国产精品成人| 欧美日韩一区二区三区在线看| 在线免费不卡电影| 91精品福利在线一区二区三区| 精品视频一区二区不卡| 欧美一区日本一区韩国一区| 日韩女优电影在线观看| 国产精品久久久爽爽爽麻豆色哟哟| 久久久久久久综合日本| 国产精品国产三级国产有无不卡 | 欧美日韩第一区日日骚| 日韩欧美精品三级| 国产日韩精品一区二区浪潮av| 国产精品久久毛片av大全日韩| 洋洋成人永久网站入口| 美女在线视频一区| 欧美自拍丝袜亚洲| 日韩免费视频线观看| 亚洲色图在线播放| 久久福利视频一区二区| 色综合久久久网| 久久理论电影网| 日本中文字幕一区二区视频 | 色素色在线综合| 精品精品国产高清一毛片一天堂| 亚洲日本青草视频在线怡红院| 激情久久久久久久久久久久久久久久 | 亚洲视频狠狠干| 成人一区二区三区在线观看| 精品日韩成人av| 国产精品免费免费| 捆绑变态av一区二区三区| 国产999精品久久久久久| 欧美性xxxxxx少妇| 亚洲成精国产精品女| 99久久久久久| 一区二区三区日韩精品视频| 色婷婷av一区二区三区软件| 一区二区三区四区不卡在线| 欧美自拍偷拍一区| 天堂蜜桃一区二区三区| 日韩精品一区二区三区中文精品 | 国产日韩v精品一区二区| 成人教育av在线| 久久精品亚洲国产奇米99| 欧美哺乳videos| 国产精品电影一区二区| 欧美激情一区二区三区四区| 麻豆精品一区二区综合av| 欧洲精品一区二区三区在线观看| 国产精品久久久久影视| 国产精品综合一区二区| 7777精品久久久大香线蕉 |