Beruflich Dokumente
Kultur Dokumente
2) SELECT * FROM (SELECT S.*,DENSE_RANK() OVER (PARTITION BY DNO ORDER BY SALARY DESC) DR
FROM SOURCE ) S
Select * from Employee a where rowid <>( select max(rowid) from Employee b where
a.Employee_num=b.Employee_num); ( co related is bad query)
http://www.oratable.com/oracle-merge-command-for-upsert/
Oracle:
BEGIN
LOOP
END LOOP;
END;
USING
ON
<match condition>
<update clause>
<delete clause>
<insert clause>
merge into student a
2 using
4 from student_n) b
5 on (a.id = b.id)
8 , a.score = b.score
Is
BEGIN
END;
Merge Tgt t
Using Src s
on (t.custno=s.custno)
Update
End;
Oracle support two types of temporary tables. Global Temporary Tables : Available since Oracle 8i and subject of
this article. Private Temporary Tables : Available since Oracle 18c. Discussed here.
Temporary Tables:
Temporary tables have all features alike normal tables but they cannot have foreign keys. And data will be
deleted after session disconnect.
https://oracle-base.com/articles/misc/temporary-tables
www.vertabelo.com/blog/technical-articles/oracle-global-temporary-table
http://www.dba-oracle.com/t_temporary_tables_sql.htm
( column_name column_data_type
...
...
( column_name column_data_type
...
...
Sequence:
MINVALUE 0
FROM TRANSACTION_LOG)
INCREMENT BY 1
Set Operators:
UNION
UNION ALL
ORDER BY region_id;
Intersect - Both the queries select all the distinct rows.
Intersect
MINUS Operator:
All distinct rows selected by the first query but not the second
Minus
Indexes increase performance of select query, they can also decrease performance of data
manipulation.
Many indexes on a table can slow down INSERTS and DELETES drastically
The more the indexes on the table, the more time inserts and delete will take.
So we need to choose the index very carefully and drop which are not in use.
Though the extra space occupied by indexes is also a consideration, it may not matter much since the
cost of data storage has declined substantially.
http://www.dataintegration.ninja/32-tips-for-oracle-sql-query-writing-and-performance-tuning/
Database partitioning :
https://docs.oracle.com/cd/B28359_01/server.111/b32024/partition.htm
http://www.complexsql.com/complex-sql-queries-examples-with-answers/