标准SQL基本查询模块的结构是
A: SELEC . . FRO . . ORDER BY
B: SELEC . . WHER . . GROUP BY
C: SELEC . . WHER . . HAVING
D: SELEC . . FRO . . WHER
A: SELEC . . FRO . . ORDER BY
B: SELEC . . WHER . . GROUP BY
C: SELEC . . WHER . . HAVING
D: SELEC . . FRO . . WHER
举一反三
- 查看表INVOICE的结果,哪两个SQL语句能执行成功() A: SELEC B: AVG(inv_date)FRO C: invoice D: SELEC E: MAX(inv_date),MIN(cust_id)FRO F: invoice G: SELEC H: MAX(AVG(SYSDATE-inv_date))FRO I: invoice J: SELEC K: AVG(inv_date-SYSDATE),AVG(inv_amt)FRO L: invoice
- 查看表INVOICE结构,下列哪个SQL语句能执行成功() A: SELEC B: inv_no,NVL2(inv_date,’Pending’,’Incomplete’)FRO C: invoice D: SELEC E: inv_no,NVL2(inv_amt,inv_date,’NotAvailable’)FRO F: invoice G: SELEC H: inv_no,NVL2(inv_date,sysdate-inv_date,sysdate)FRO I: invoice J: SELEC K: inv_no,NVL2(inv_amt,inv_amt*.25,’NotAvailable’)FRO L: invoice
- 查看表MARKS结构,哪个SQL语句能执行成功() A: SELEC B: student_name,subject1.FRO C: marks.WHERE-subject1>AVG(subject1) D: SELEC E: student_name,SUM(subject1)FRO F: marks.WHERE-student_name-LIKE’R%’ G: SELEC H: SUM(subject1+subject2+subject3)FRO I: marks.WHERE-student_name-ISNULL J: SELEC K: SUM(DISTINC L: NVL(subject1,0)),MAX(subject1)FRO M: mark.sWHERE-subject1>subject2
- 你需要计算从2007年1月1日至今天的天数,日期的默认存储格式为dd-mon-rr。下列哪个SQL能得到正确的结果() A: SELEC B: SYSDATE-’01-JAN-2007’FROMDUAL; C: SELEC D: SYSDATE-TO_DATE(’01/JANUARY/2007’)FRO E: DUAL; F: SELEC G: SYSDATE-TO_DATE(’01-JANUARY-2007’)FRO H: DUAL; I: SELEC J: TO_CHAR(SYSDATE,’DD-MON-YYYY’)-’01-JAN-2007’FRO K: DUAL; L: SELEC M: TO_DATE(SYSDATE,’DD/MONTH/YYYY’)-’01/JANUARY/2007’FRO N: DUAL;
- 你需要为每个客户的信息额度增加$1000。在输出时,客户的lastname列头应为() A: SELEC B: cust_last_name.Name,cust_credit_limit+1000"New.Credit.Limit"FRO C: customers D: SELEC E: cust_last_name.ASName,cust_credit_limit+1000A F: New.Credit.Limit.FRO G: customers H: SELEC I: cust_last_name.AS"Name",cust_credit_limit+1000AS"New.Credit.Limit"FRO J: customers K: SELEC L: INITCAP(cust_last_name)"Name",cust_credit_limit+1000INITCAP("NEWCREDITLIMIT")FRO M: customers