Professional Documents
Culture Documents
101 manu29809@gmail@com
102 pankajdhaka@dav@hotmail.com
103 pranav165@yahoo.co.in
104 meetshrotriya@gmail.comcom
105 arya.anit3@gmail.com
In the above example, empno 103 and 105 is having valid email address
FROM Employee
Q. Trouble inserting rows into a table. 164k rows are to be inserted, usually I can successfully insert single row.
What can be the reasons? One of my hunch is that indexes are causing the trouble.
2. Use append hint along with insert statement if you are running single sql statement.
And if that is non prod db then you can use nologging hint too.
Q. How to retrieve whole column data in single row,that data can be separated with semicolon(;) ?
Ans. Select listagg(ename, ',') within group (order by ename) from emp;
The following single-set aggregate example lists all of the employees in Department 30 in the hr.employees table,
ordered by hire date and last name:
Q. How to find size of a table in Oracle and how can we know which table have occupied more space in the DB?
sum(bytes) size
from dba_segments
where upper(owner)=upper('<tablename>')
group by segment_name
order by 2 desc;
Q. How can we return data which is contain "Yellow", without using OR operator from the below table?
Query 3:
WITH x AS (
SELECT sno, col_num, col_name
FROM colors
UNPIVOT (col_name for col_num in (color1 AS 1, color2 as 2, color3 AS 3))
)
SELECT sno, color1, color2, color3
FROM x JOIN colors USING (sno)
WHERE col_name='Yellow';
Those are very helpful docs in terms of performance tuning concept, Will give more details on how to understand explain plan
table .
links...
https://docs.oracle.com/cd/A58617_01/server.804/a58246/intro.htm
https://docs.oracle.com/cd/E11882_01/server.112/e41573/perf_overview.htm#PFGRF025
https://docs.oracle.com/cd/E11882_01/server.112/e41573/toc.htm
https://docs.oracle.com/.../server.804/a58246/intro.htm
https://docs.oracle.com/.../e41573/perf_overview.htm...
https://docs.oracle.com/.../E11.../server.112/e41573/toc.htm
A. Select Rownum r
From dual
SELECT LEVEL n
FROM DUAL
SELECT V
FROM DUAL
MODEL DIMENSION BY (0 R)
MEASURES (0 V)
V[ITERATION_NUMBER] = ITERATION_NUMBER + 1
ORDER BY 1;
from dual
4
SELECT rownum