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

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

?? apf.htm

?? Learn SQL in an easy way...
?? HTM
?? 第 1 頁 / 共 5 頁
字號:
<BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>SELECT EMPLOYEE.LAST_NAME, EMPLOYEE.FIRST_NAME, EMPLOYEE.MIDDLE_NAME,EMPLOYEE.ADDRESS, EMPLOYEE.PHONE_NUMBER, PAYROLL.SALARY, PAYROLL.POSITION,EMPLOYEE.SSN, PAYROLL.START_DATE FROM EMPLOYEE, PAYROLL WHEREEMPLOYEE.SSN = PAYROLL.SSN AND EMPLOYEE.LAST_NAME LIKE 'S%' ANDPAYROLL.SALARY &gt; 20000;</B></FONT></PRE></BLOCKQUOTE><DL>	<DD>You should reformat the SQL statement as follows, depending on the consistent	format of your choice:</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>SELECT E.LAST_NAME, E.FIRST_NAME, E.MIDDLE_NAME,       E.ADDRESS, E.PHONE_NUMBER, P.SALARY,       P.POSITION, E.SSN, P.START_DATEFROM EMPLOYEE E,     PAYROLL PWHERE E.SSN = P.SSN  AND E.LAST_NAME LIKE 'S%'  AND P.SALARY &gt; 20000;</B></FONT></PRE></BLOCKQUOTE><DL>	<DD><B>2.</B> Rearrange the conditions in the following query to optimize data retrieval	time.Use the following statistics (on the tables in their entirety) to determine	the order of the conditions:</DL><BLOCKQUOTE>	<P>593 individuals have the last name <TT>SMITH</TT>.</P>	<P>712 individuals live in <TT>INDIANAPOLIS</TT>.</P>	<P>3,492 individuals are <TT>MALE</TT>.</P>	<P>1,233 individuals earn a salary &gt;= <TT>30,000</TT>.</P>	<P>5,009 individuals are single.</BLOCKQUOTE><DL>	<DD><TT>Individual_id</TT> is the primary key for both tables.	<PRE><FONT COLOR="#0066FF"><B>SELECT M.INDIVIDUAL_NAME, M.ADDRESS, M.CITY, M.STATE, M.ZIP_CODE,       S.SEX, S.MARITAL_STATUS, S.SALARYFROM MAILING_TBL M,     INDIVIDUAL_STAT_TBL SWHERE M.NAME LIKE 'SMITH%'  AND M.CITY = 'INDIANAPOLIS'  AND S.SEX = 'MALE'  AND S.SALARY &gt;= 30000  AND S.MARITAL_STATUS = 'S'  AND M.INDIVIDUAL_ID = S.INDIVIDUAL_ID;</B>--------------</FONT></PRE>	<DD><I>Answer:</I>	<P>According to the statistics, your new query should look similar to the following	answer. <TT>Name like 'SMITH%'</TT> is the most restrictive condition because it	will return the fewest rows:</DL><PRE></PRE><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>SELECT M.INDIVIDUAL_NAME, M.ADDRESS, M.CITY, M.STATE, M.ZIP_CODE,       S.SEX, S.MARITAL_STATUS, S.SALARYFROM MAILING_TBL M,     INDIVIDUAL_STAT_TBL SWHERE M.INDIVIDUAL_ID = S.INDIVIDUAL_ID  AND S.MARITAL_STATUS = 'S'  AND S.SEX = 'MALE'  AND S.SALARY &gt;= 30000  AND M.CITY = 'INDIANAPOLIS'  AND M.NAME LIKE 'SMITH%';</B></FONT></PRE></BLOCKQUOTE><PRE><FONT COLOR="#0066FF"><B></B></FONT></PRE><H2><FONT COLOR="#000077">Day 16, &quot;Using Views to Retrieve Useful Informationfrom the Data Dictionary&quot;</FONT></H2><H3><FONT COLOR="#000077">Quiz Answers</FONT></H3><DL>	<DD><B>1.</B> In Oracle, how can you find out what tables and views you own?	<P>By selecting from <TT>USER_CATALOG</TT> or <TT>CAT</TT>. The name of the data	dictionary object will vary by implementation, but all versions have basically the	same information about objects such as tables and views.</P>	<P><B>2.</B> What types of information are stored in the data dictionary?<BR>	Database design, user statistics, processes, objects, growth of objects, performance	statistics, stored SQL code, database security.</P>	<P><B>3.</B> How can you use performance statistics?</P>	<P>Performance statistics suggest ways to improve database performance by modifying	database parameters and streamlining SQL, which may also include the use of indexes	and an evaluation of their efficiency.</P>	<P><B>4. </B>What are some database objects?<BR>	Tables, indexes, synonyms, clusters, views.</DL><H3><FONT COLOR="#000077">Exercise Answers</FONT></H3><P>Suppose you are managing a small to medium-size database. Your job responsibilitiesinclude developing and managing the database. Another individual is inserting largeamounts of data into a table and receives an error indicating a lack of space. Youmust determine the cause of the problem. Does the user's tablespace quota need tobe increased, or do you need to allocate more space to the tablespace? Prepare astep-by-step list that explains how you will gather the necessary information fromthe data dictionary. You do not need to list specific table or view names.<DL>	<DD><B>1. </B>Look up the error in your database documentation.	<P><B>2.</B> Query the data dictionary for information on the table, its current	size, tablespace quota on the user, and space allocated in the tablespace (the tablespace	that holds the target table).</P>	<P><B>3.</B> Determine how much space the user needs to finish inserting the data.</P>	<P><B>4.</B> What is the real problem? Does the user's tablespace quota need to be	increased, or do you need to allocate more space to the tablespace?</P>	<P><B>5.</B> If the user does not have a sufficient quota, then increase the quota.	If the current tablespace is filled, you may want to allocate more space or move	the target table to a tablespace with more free space.</P>	<P><B>6.</B> You may decide not to increase the user's quota or not to allocate more	space to the tablespace. In either case you may have to consider purging old data	or archiving the data off to tape.</P>	<P>These steps are not irrevocable. Your action plan may vary depending upon your	company policy or your individual situation.</DL><H2><FONT COLOR="#000077">Day 17, &quot;Using SQL to Generate SQL Statements&quot;</FONT></H2><H3><FONT COLOR="#000077">Quiz Answers</FONT></H3><DL>	<DD><B>1.</B> From which two sources can you generate SQL scripts?	<P>You can generate SQL scripts from database tables and the data dictionary.</P>	<P><B>2. </B>Will the following SQL statement work? Will the generated output work?</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF">SQL&gt; <B>SET ECHO OFF</B>SQL&gt; <B>SET FEEDBACK OFF</B>SQL&gt; <B>SPOOL CNT.SQL</B>SQL&gt; <B>SELECT 'COUNT(*) FROM  ' || TABLE_NAME || ';'</B>  2  <B>FROM CAT</B>  3  <B>/</B></FONT></PRE></BLOCKQUOTE><DL>	<DD>Yes the SQL statement will generate an SQL script, but the generated script will	not work. You need <TT>select 'select'</TT> in front of <TT>count(*)</TT>:</DL><PRE></PRE><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>SELECT 'SELECT COUNT(*) FROM ' || TABLE_NAME || ';'</B></FONT></PRE></BLOCKQUOTE><DL>	<DD>Otherwise, your output will look like this:</DL><PRE></PRE><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>COUNT(*) FROM TABLE_NAME;</B></FONT></PRE></BLOCKQUOTE><DL>	<DD>which is not a valid SQL statement.	<P><B>3. </B>Will the following SQL statement work? Will the generated output work?</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF">SQL&gt; <B>SET ECHO OFF</B>SQL&gt; <B>SET FEEDBACK OFF</B>SQL&gt; <B>SPOOL GRANT.SQL</B>SQL&gt;<B> SELECT 'GRANT CONNECT DBA TO ' || USERNAME || ';'</B>  2  <B>FROM SYS.DBA_USERS</B>  3  <B>WHERE USERNAME NOT IN ('SYS','SYSTEM','SCOTT')</B>  4 <B> /</B></FONT></PRE></BLOCKQUOTE><DL>	<DD>Once again, yes and no. The statement will generate an SQL script, but the SQL	that it generates will be incomplete. You need to add a comma between the privileges	<TT>CONNECT</TT> and <TT>DBA</TT>:</DL><PRE></PRE><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>SELECT 'GRANT CONNECT, DBA TO ' || USERNAME || ';'</B></FONT></PRE></BLOCKQUOTE><DL>	<DD><B>4.</B> Will the following SQL statement work? Will the generated output work?</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF">SQL&gt; <B>SET ECHO OFF</B>SQL&gt; <B>SET FEEDBACK OFF</B>SQL&gt; <B>SELECT 'GRANT CONNECT, DBA TO ' || USERNAME || ';'</B>  2  <B>FROM SYS.DBA_USERS</B>  3  <B>WHERE USERNAME NOT IN ('SYS','SYSTEM','SCOTT')</B>  4 <B> /</B></FONT></PRE></BLOCKQUOTE><DL>	<DD>Yes. The syntax of the main statement is valid, and the SQL that will be generated	will grant <TT>CONNECT</TT> and <TT>DBA </TT>to all users selected.	<P><B>5. </B>True or False: It is best to set feedback <TT>on</TT> when generating	SQL.</P>	<P>False. You do not care how many rows are being selected, as that will not be part	of the syntax of your generated statements.</P>	<P><B>6.</B> True or False: When generating SQL from SQL, always spool to a list	or log file for a record of what happened.</P>	<P>False. You should spool to an <TT>.sql</TT> file, or whatever your naming convention	is for an SQL file. However, you may choose to spool within your generated file.</P>	<P><B>7. </B>True or False: Before generating SQL to truncate tables, you should	always make sure you have a good backup of the tables.</P>	<P>True. Just to be safe.</P>	<P><B>8.</B> What is the <TT>ed</TT> command?</P>	<P>The <TT>ed</TT> command takes you into a full screen text editor. <TT>ed</TT>	is very similar to <TT>vi</TT> on a UNIX system and appears like a Windows Notepad	file.</P>	<P><B>9. </B>What does the <TT>spool off</TT> command do?<BR>	The <TT>spool off</TT> command closes an open spool file.</DL><H3><FONT COLOR="#000077">Exercise Answers</FONT></H3><DL>	<DD><B>1. </B>Using the SYS.DBA_USERS view (Personal Oracle7), create an SQL statement	that will generate a series of <TT>GRANT</TT> statements to five new users: John,	Kevin, Ryan, Ron, and Chris. Use the column called <TT>USERNAME</TT>. Grant them	Select access to <TT>history_tbl</TT>.</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF">SQL&gt; <B>SET ECHO OFF</B>SQL&gt; <B>SET FEEDBACK OFF</B>SQL&gt; <B>SPOOL GRANTS.SQL</B>SQL&gt; <B>SELECT 'GRANT SELECT ON HISTORY_TBL TO ' || USERNAME || ';'</B>  2  <B>FROM SYS.DBA_USERS</B>  3  <B>WHERE USERNAME IN ('JOHN','KEVIN','RYAN','RON','CHRIS')</B>  4 <B> /</B>grant select on history_tbl to JOHN;grant select on history_tbl to KEVIN;grant select on history_tbl to RYAN;grant select on history_tbl to RON;grant select on history_tbl to CHRIS;</FONT></PRE></BLOCKQUOTE><DL>	<DD><B>2. </B>Using the examples in this chapter as guidelines, create some SQL statements	that will generate SQL that you can use.	<P>There are no wrong answers as long as the syntax is correct in your generated	statements.</DL><BLOCKQUOTE>	<P><HR><FONT COLOR="#000077"><B>WARNING:</B></FONT><B> </B>Until you completely understand	the concepts presented in this chapter, take caution when generating SQL statements	that will modify existing data or database structures. <HR></BLOCKQUOTE><H2><FONT COLOR="#000077">Day 18, &quot;PL/SQL: An Introduction&quot;</FONT></H2><H3><FONT COLOR="#000077">Quiz Answers</FONT></H3><DL>	<DD><B>1.</B> How is a database trigger used?	<P>A database trigger takes a specified action when data in a specified table is	manipulated. For instance, if you make a change to a table, a trigger could insert	a row of data into a history table to audit the change.</P>	<P><B>2.</B> Can related procedures be stored together?<BR>	Related procedures may be stored together in a package.</P>	<P><B>3.</B> True or False: Data Manipulation Language can be used in a PL/SQL statement.<BR>	True.</P>	<P><B>4. </B>True or False: Data Definition Language can be used in a PL/SQL statement.</P>	<P>False. DDL cannot be used in a PL/SQL statement. It is not a good idea to automate	the process of making structural changes to a database.</P>	<P><B>5. </B>Is text output directly a part of the PL/SQL syntax?<BR>	Text output is not directly a part of the language of PL/SQL; however, text output	is supported by the standard package <TT>DBMS_OUTPUT</TT>.</P>	<P><B>6.</B> List the three major parts of a PL/SQL statement.<BR>	<TT>DECLARE</TT> section, <TT>PROCEDURE</TT> section, <TT>EXCEPTION</TT> section.</P>	<P><B>7.</B> List the commands that are associated with cursor control.<BR>	<TT>DECLARE</TT>, <TT>OPEN</TT>, <TT>FETCH</TT>, <TT>CLOSE</TT>.</DL><H3><FONT COLOR="#000077">Exercise Answers</FONT></H3><DL>	<DD><B>1.</B> Declare a variable called <TT>HourlyPay</TT> in which the maximum accepted	value is <TT>99.99</TT>/hour.</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>DECLARE     HourlyPay number(4,2);</B></FONT></PRE></BLOCKQUOTE><DL>	<DD><B>2.</B> Define a cursor whose content is all the data in the <TT>CUSTOMER_TABLE</TT>	where the <TT>CITY</TT> is <TT>INDIANAPOLIS</TT>.</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>DECLARE      cursor c1 is      select * from customer_table      where city = 'INDIANAPOLIS';</B></FONT></PRE></BLOCKQUOTE><DL>	<DD><B>3.</B> Define an exception called <TT>UnknownCode</TT>.</DL><PRE></PRE><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>DECLARE      UnknownCode EXCEPTION;</B></FONT></PRE></BLOCKQUOTE><DL>	<DD><B>4.</B> Write a statement that will set the <TT>AMT</TT> in the <TT>AMOUNT_TABLE</TT>	to <TT>10</TT> if <TT>CODE</TT> is <TT>A</TT>, set the <TT>AMT</TT> to <TT>20</TT>	if <TT>CODE</TT> is <TT>B</TT>, and raise an exception called <TT>UnknownCode</TT>	if <TT>CODE</TT> is neither <TT>A</TT> nor <TT>B</TT>. The table has one row.</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><B>IF ( CODE = 'A' ) THEN      update AMOUNT_TABLE      set AMT = 10;    ELSIF ( CODE = 'B' ) THEN       update AMOUNT_TABLE      set AMT = 20;    ELSE      raise UnknownCode;    END IF; </B></FONT></PRE></BLOCKQUOTE><H2><FONT COLOR="#000077">Day 19, &quot;Transact-SQL: An Introduction&quot;</FONT></H2><H3><FONT COLOR="#000077">Quiz Answers</FONT></H3><DL>	<DD><B>1.</B> True or False: The use of the word SQL in Oracle's PL/SQL and Microsoft/Sybase's	Transact-SQL implies that these products are fully compliant with the ANSI standard.	<P>False. The word is not protected by copyright. The products mentioned do comply	with much of the ANSI standard, but they do not fully comply with everything in that	standard.</P>	<P><B>2. </B>True or False: Static SQL is less flexible than Dynamic SQL, although	the performance of static SQL can be better.</P>	<P>True. Static SQL requires the use of a precompiler, and its queries cannot be	prepared at runtime. Therefore, static SQL is less flexible than dynamic SQL, but	because the query is already processed, the performance can be better.</DL><H3><FONT COLOR="#000077">Exercise Answers</FONT></H3><DL>	<DD><B>1. </B>If you are not using Sybase/Microsoft SQL Server, compare your product's	extensions to ANSI SQL to the extensions mentioned today.	<P>Because nearly all of Day 19 deals with Transact-SQL, we did not explore the many	other extensions to ANSI SQL. Most documentation that accompanies database products	makes some eff

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区在线免费观看| 日韩精品一区二区三区在线| 国产精品久久久久永久免费观看| 国产精一区二区三区| 久久久久久夜精品精品免费| 国产乱人伦偷精品视频不卡| 亚洲一区二区三区国产| 日本成人在线视频网站| 欧美一区二区网站| 国内精品国产三级国产a久久| 久久影院视频免费| 国产91精品在线观看| 国产精品电影一区二区三区| 91香蕉视频污在线| 香蕉av福利精品导航| 精品国内二区三区| heyzo一本久久综合| 亚洲一区二区视频在线观看| 欧美一区二区日韩一区二区| 国产盗摄女厕一区二区三区| 亚洲天堂久久久久久久| 欧美男生操女生| 国内精品久久久久影院一蜜桃| 欧美激情在线看| 欧美日韩综合在线免费观看| 紧缚奴在线一区二区三区| 国产精品视频一二三| 欧美日韩一区二区三区四区| 国产精品一区不卡| 亚洲国产一区视频| 久久久99久久| 欧美日韩一本到| 国产mv日韩mv欧美| 婷婷亚洲久悠悠色悠在线播放| 久久综合久色欧美综合狠狠| 91丨九色丨尤物| 美女免费视频一区二区| 国产精品初高中害羞小美女文| 欧美老女人第四色| av亚洲产国偷v产偷v自拍| 日韩 欧美一区二区三区| 中文字幕中文字幕在线一区 | 免费在线观看成人| 国产精品久久久久久久浪潮网站| 欧美日韩视频不卡| 不卡视频免费播放| 精品午夜一区二区三区在线观看| 亚洲图片激情小说| 久久精品亚洲一区二区三区浴池| 欧美人牲a欧美精品| www.激情成人| 国产福利一区二区| 日本午夜精品视频在线观看| 国产精品久久久久久户外露出 | 欧美群妇大交群中文字幕| www.欧美精品一二区| 国产尤物一区二区在线| 日韩专区在线视频| 亚洲综合免费观看高清在线观看| 久久久国产精品午夜一区ai换脸| 欧美浪妇xxxx高跟鞋交| 日本福利一区二区| 91麻豆高清视频| 99久久久无码国产精品| 成人毛片在线观看| 成人小视频在线观看| 国产专区综合网| 老司机精品视频线观看86| 日韩精品91亚洲二区在线观看| 亚洲乱码国产乱码精品精小说 | 国产成人av资源| 国产在线一区观看| 久久99国产精品尤物| 日本不卡视频在线| 免费精品视频最新在线| 免费亚洲电影在线| 婷婷国产在线综合| 日韩激情视频在线观看| 天天综合日日夜夜精品| 亚洲成av人**亚洲成av**| 亚洲成人一区二区| 天堂资源在线中文精品| 亚洲国产人成综合网站| 亚洲午夜激情av| 三级一区在线视频先锋| 蜜臀av国产精品久久久久| 久久成人免费网| 国内成人免费视频| 国产成人av福利| 成人免费观看av| av亚洲精华国产精华精华 | 欧美二区在线观看| 日韩欧美一区在线| 精品国产网站在线观看| 亚洲精品在线免费观看视频| 久久久91精品国产一区二区三区| 中文字幕成人网| 亚洲激情欧美激情| 日韩电影一二三区| 国产一区二区三区免费播放| 大白屁股一区二区视频| 91久久精品日日躁夜夜躁欧美| 欧美男女性生活在线直播观看| 日韩欧美国产一区二区三区 | www.日韩大片| 欧美日韩中文字幕一区| 欧美成人艳星乳罩| 国产精品久久久久久一区二区三区| 亚洲男人的天堂在线aⅴ视频| 五月婷婷久久综合| 美女视频黄免费的久久| 国产精品一区二区视频| 韩国v欧美v日本v亚洲v| 成人一道本在线| 欧美亚洲自拍偷拍| 精品免费99久久| 亚洲日本一区二区| 天天做天天摸天天爽国产一区| 狠狠狠色丁香婷婷综合久久五月| 岛国一区二区三区| 欧美日韩精品一二三区| 欧美激情一区二区三区全黄| 亚洲美女在线国产| 久热成人在线视频| 一本色道亚洲精品aⅴ| 精品少妇一区二区三区在线视频| 国产精品美女久久久久久久久 | 成人一级片在线观看| 欧美日韩亚州综合| 欧美激情一区二区三区蜜桃视频| 丝袜国产日韩另类美女| 国产99久久久国产精品免费看| 欧美高清视频一二三区| 国产精品久久福利| 强制捆绑调教一区二区| 在线欧美一区二区| 国产精品伦理在线| 国产自产v一区二区三区c| 欧美精品第一页| 亚洲欧美一区二区三区久本道91| 久久66热re国产| 欧美日韩国产精品成人| 1区2区3区欧美| 成人小视频在线观看| 精品福利一区二区三区免费视频| 一区二区三区在线观看视频| 成人一区二区在线观看| 精品国产髙清在线看国产毛片| 亚洲成人自拍偷拍| 在线中文字幕一区| 亚洲欧洲国产日韩| 国产不卡视频一区二区三区| 精品久久久久久久久久久久久久久久久| 亚洲精品中文在线观看| 成人av午夜影院| 欧美高清在线视频| 国产成人在线免费| 久久综合九色综合97婷婷| 久久精品国产澳门| 日韩视频永久免费| 青青国产91久久久久久| 欧美人xxxx| 免费成人小视频| 日韩一二在线观看| 青草国产精品久久久久久| 3atv在线一区二区三区| 日韩精品国产精品| 91精品久久久久久久91蜜桃| 午夜av一区二区三区| 欧美男生操女生| 日本不卡中文字幕| 日韩午夜中文字幕| 欧美日本在线观看| 国产精品色婷婷久久58| 风流少妇一区二区| 国产精品美日韩| 成人av资源在线| 亚洲欧美日韩国产手机在线 | 国产色综合一区| 国产精品一区二区不卡| 国产精品丝袜黑色高跟| 色综合久久综合网欧美综合网| 亚洲视频一区二区在线| 91免费在线视频观看| 亚洲一区自拍偷拍| 欧美精品高清视频| 国产九色sp调教91| 亚洲色图一区二区| 欧美另类变人与禽xxxxx| 久久精品国产99| 国产精品卡一卡二| 在线一区二区观看| 日日夜夜免费精品| 久久亚洲综合av| 91美女片黄在线| 天天做天天摸天天爽国产一区 | 粉嫩av一区二区三区在线播放| 国产精品日日摸夜夜摸av| 91麻豆精品一区二区三区| 亚洲777理论|