Category Archives: sql

Define the order of priority when executing sql statements ?

  Order Evaluated Operator 1 Arithmetic operators (*, /, +, -) 2 Concatenation operators (||) 3 Comparison conditions 4 Is[NOT] NULL, LIKE, [NOT] IN 5 [NOT] BETWEEN 6 NOT Logical condition 7 AND logical condition 8 OR logical condition Advertisements

Posted in oracle, sql | Tagged , , | Leave a comment

What is ROW_NUMBER() function in oracle ?

Before knowing the ROW_NUMBER() function we need to understand the oracle analytical functions: Analytical means to get more control & allowing to operate within a table’s column or data like: Analytical functions also know as windowing functions. it mostly used … Continue reading

Posted in oracle, sql | Tagged , | Leave a comment

Types of constraints available in oracle

There are five types of constraint available in oracle as following: NOT NULL: NOT NULL Constraint ensures that the column contains no null values. UNIQUE KEY: UNIQUE Key Constraint ensures that every value in a column or set of columns must be … Continue reading

Posted in oracle, sql | Tagged , | Leave a comment

What is ETL in Sql ?ETL

What is ETL: ETL stands for Extract, Transform, Load. Extract means to read data from source, Transform means to apply business logic on data & in last load means to add or load data on other server. ETL (Extract, Transform … Continue reading

Posted in oracle, sql | Tagged | Leave a comment

How do I find duplicate values in a table in Oracle?

To find duplicate value we need the sql group by & having clause as below. SELECT V.FIELD_NAME1, COUNT(*) FROM TABLE_NAME V GROUP BY V.FIELD_NAME1 HAVING COUNT(*)>1 How query works? First it will group the same value by non-clustered index i.e. virtual … Continue reading

Posted in oracle, sql | Tagged | Leave a comment

What is clustered & non-clustered index in oracle?

Clustered index & Non-clustered index A clustered index the table records are physically stored on the basic of that index, A table can have only one clustered index because of physically stored to the table. A Non-clustered index that is … Continue reading

Posted in oracle, sql | Tagged , | Leave a comment

How to get oracle table size in MB ?

select segment_name,segment_type,bytes/1024/1024 MB from dba_segments where segment_type=’TABLE’ and lower(segment_name)=’your_table_name’;

Posted in oracle, sql | Tagged | Leave a comment