删除重复数据
删除重复数据delete from mdsp_t_prodorderex where rowid not in (select min(rowid) from mdsp_t_prodorderex group by productorderkey);
导入数据时遭遇ORA-39087错误
假设导入用户为sysdb数据文件存放目录为DATA_PUMP_DIR 查询:select * from dba_directories where DIRECTORY_NAME='DATA_PUMP_DIR';查看目录是否存在 select owner,table_name,grantor,privilege from d...
Control the order of rows returned
01 SELECT 'Individual', 02 LAST_NAME || ', ' || FIRST_NAME 03 FROM CRUISE_CUSTOMERS 04 UNION 05&nb...
12 Using the Set Operators
1. 4种操作符:union,union all,intersect,minus2. SELECT... UNION (SELECT... INTERSECT SELECT...) INTERSECT SELECT...Just be sure to use the parentheses so that:n The code enclosed is a standa...
1212
Review the WORK_HISTORY table:Your task is to create a query that will list—for each ship—all of the EMPLOYEE_ID values for all the employees who have the shortest work history for their ship. In...
1 Managing Schema Objects
1 Managing Schema Objects1.1 Add and Modify Columns1.11 &nb...
solve Problems with Correlated subqueries
SELECT A.SHIP_CABIN_ID, A.ROOM_STYLE, A.ROOM_NUMBER, A.SQ_FT FROM SHIP_CABINS A WHERE A.SQ_FT > (SELECT AVG(SQ_FT) FROM SHIP_CABINS W...