Description: Replication table (only copy structure, source name: A new table name: b) SQL: SELECT * INTO B from a where 1 <> 1
Description: Copy Table (copy information, source name: a target table name: b) SQL: INSERT INTO B (A, B, C) SELECT D, E, F from B;
Description: Display article, author and last reply time sql: select a.title, a.username, b.adddate from table a, (select max (adddddate) addddde from table where table.title = a.title) B
Description: External connection query (table name 1: a table name 2: b) SQL: SELECT A.A, A.B, A.C, B.C, B.D, B.f from a left out join b on a.a = b.c
Description: Remind SQL: Select * from scheduiode Arrangement in advance: SERETED * FROM schedule WHERE dateDiff ('minute', f Start time, getdate ())> 5
Description: Two related tables, delete information in the primary table SQL: delete from info where info.infiD = infoBz.infid
Description: SQL: SELECT A.NUM, A.NAME, B.UPD_DATE, B.PREV_UPD_DATE FROM TABLE1, (SELECT X.NUM, X.UPD_DATE, Y.UPD_DATE PREV_UPD_DATE FROM (SELECT NUM, UPD_DATE, INBOUND_QTY, STOCK_ONHAND FROM TABLE2 WHERE TO_CHAR (UPD_DATE, 'YYYY / MM') = TO_CHAR (SYSDATE, 'YYYY / MM')) X, (SELECT NUM, UPD_DATE, STOCK_ONHAND FROM TABLE2 WHERE TO_CHAR (UPD_DATE, 'YYYY / MM') = TO_CHAR (TO_DATE (TO_CHAR (Sysdate, 'yyyy / mm') || '/ 01', 'YYYY / MM / DD') - 1, 'YYYY / mm')) y, where x.num = y. Num ( ) and x. Inbound_Qty NVL (Y.Stock_OnHand, 0) <> x.stock_onhand) bwhere a.num = B.NUM
Description: SQL: select * from studentinfo where not exists (select * from student where studentinfo.id = student.id) and department name = ' "& strdepartmentname &"' and professional name = ' "& strprofessionname &"' order by gender, new students, Color college entrance examination
Description: From the data library to each unit of telephone bill statistics (telephone bills, fixed-time, payment, single source) SQL: Select A. user, a.tel, a.standfee, to_char (a.telfeedate, 'YYYY ') As Telyear, SUM (decode (to_char (a.telfeedate,' mm '),' 01 ', a.factration) AS Jan, SUM (Decode (a.telfeedate,' mm '),' 02 ' , A.Factration) AS fri, sum (decode (a.telfeedate, 'mm'), '03', a.factration) AS Mar, SUM (Decode (to_char (a.telfeedate, 'mm') , '04', A.FACTRATION) AS APR, SUM (Decode (a.telfeedate, 'mm'), '05', a.factration) AS May, SUM (Decode (a.telfeedate, 'mm'), '06', a.factration) AS JUE, SUM (Decode (to_CHAR (a.telfeedate, 'mm'), '07', a.factration) AS JUL, SUM (Decode (to_CHAR A.Telfeedate, 'mm'), '08', a.factration) AS AGU, SUM (Decode (to_CHAR (A.TELFEEDATE, 'mm'), '09', a.factration) AS SEP, SUM Decode (TO_CHAR (A.TELFEEDATE, 'mm'), '10', a.factration)) AS OCT, SUM (Decode (to_char (a.telfeedate, 'mm'), '11', a.factration) AS NOV, SUM (Decode (a.telfeedate, 'mm'), '12', a.factration) AS DEC from (SELECT A.USERPER, A.TEL, A.Standfee, B.Telfeed Ate, B.Factration from Telfeestand A, Telfee B Where a.tel = b.telfax) a group by a. ipserper, a.tel, a.standfee, to_char (a.telfeedate, 'yyyy') Description: Quad Table Question: SQL: Select * from a left inner join b on aa = bb Right Inner Join C on aa = cc inner join d on aa = dd where .....
Description: Get the smallest unused ID number SQL: Select * from Handle B Where B.Handleid = 1) Then Min (Handleid) 1 Else 1 End) AS Handleid from Handle WHERE NOT HANDLEID In (SELECT A.handleid - 1 from Handle A)