Find the best tutors and institutes for Oracle Training
Search for topics
Lesson Posted on 02/12/2020 IT Courses/Oracle Training
Sagar Waikar
Overall strong 17 years of IT industry experience and I have a strong experience on PeopleSoft HRMS for...
What are Joins in SQL?
What are the types of joins?
Let’s discuss Inner join or simple join in detail.
Inner Join
How to join?
Syntax:
SELECT column1, column2 from table1 INNER JOIN table2 ON table1.fieldname = table2.fieldname
LEFT Join
What is left join?
How to use a LEFT join
Syntax:
SELECT column1, column2 From table1 LEFT JOIN table 2
ON table1.common_field = table2.common_field
RIGHT JOIN
What is Right, Join?
How to use a RIGHT join
Syntax:
SELECT column1, column2 From table1 RIGHT JOIN table 2
ON table1.common_field = table2.common_field
FULL JOIN
What is Full Join?
How to Join?
Syntax:
SELECT column_name(s)
FROM table1
FULL OUTER JOIN table2
ON table1.column_name = table2.column_name
WHERE condition;
read lessAnswered on 20/04/2020 IT Courses/Oracle Training
Debasis Classes
Answered on 21/03/2020 IT Courses/Oracle Training
Sakshi Saxena
IT Professional Trainer with 7 years of experience in Teaching
Looking for Oracle Training
Find best Oracle Training in your locality on UrbanPro.
Lesson Posted on 05/01/2020 IT Courses/SQL Programming IT Courses/Oracle Training IT Courses/PL/SQL
Interview questions based on "level", a pseudocolumn
Gavi Yatnalli
It's going to be a multidimensional experience when you attend the classes. Take a chance and enjoy the ride.
1. Write a query to get the below output,
1 | 11 | 21 | 31 | .. | .. | 91 |
2 | 12 | 22 | 32 | .. | .. | 92 |
3 | 13 | 23 | 33 | .. | .. | 93 |
.. | ||||||
.. | .. | .. | .. | .. | .. | .. |
.. | .. | .. | .. | .. | .. | .. |
10 | 20 | 30 | 40 | 100 |
Ans:
select level,level+10,level+20,
level+30,level+40,level+50,
level+60,level+70,level+80,
level+90
from dual connect by level <=10;
2. Write a query to generate tables from 7 to 70.
Like, 7,14,21....8,16,24...9,18,27......70,140,210.
Ans:
Select a.a*b.b from
(select level+6 a from dual connect by level <=64) a,
(select level b from dual connect by level <=10) b;
And there are many more.............
read lessLesson Posted on 05/01/2020 IT Courses/PL/SQL IT Courses/Oracle Training/Oracle PL/SQL IT Courses/SQL Programming
How does a SQL Query Execute inside Oracle? What are the steps followed in the background?
Gavi Yatnalli
It's going to be a multidimensional experience when you attend the classes. Take a chance and enjoy the ride.
The above snapshot says it all. Hence it is said, 'Picture says it all'.
Basically, there are 4-5 steps. There are two possible ways of query being executed.
1. Soft Parse- Improves performance. This is also called as 'Library Cache Hit'.
2. Hard Parse- Degrades performance. This is also called as 'Library Cache Miss'.
Let us understand the steps one by one briefly.
There is a parser inside Oracle, which parses the SQL Query for further processing.
The first 3 steps of SQL Query Execution are taken care of by the parser.
Step 1: Syntax check
This checks only for syntax errors. A pure syntax check and nothing else.
Examples: 1. Are the keywords correct?
Like, 'seelect', 'form', 'groupby', 'orderby' are few common spelling mistakes.
2. Does SQL Query end with a semicolon (;)?
3. Are column names in the 'Select' Clause are separated by commas (,)?
4. Does 'Select' clause include only the colmuns which are present in the 'Group by' clause?
5. Does 'Group by' clause appear after 'Where clause'?
6. Is 'Order by' clause the last clause in the query?
etc. etc....
In each of these cases, if the answer is 'No', oracles throws an error stating the same.
Step 2: Sematic chck
Once the query passes the Syntax check, next step is Semantic check.
Here, the references of all objects present in the query are checked along with user privileges. The check happens against metadata maintained in the Oracle.
Examples: 1. Is table name valid or such a table exists?
2. Are columns names correct?
3. Does user have select/update/delete/insert/create privilege?
etc. etc. etc.
So during Syntax check, it doesn't check for the validity of table names, column names, privileges etc.
Let's say, I am running this... "select * from epm;"
This passes Syntax check, though I am writing a wrong table name. Instead of "emp", I have written "epm". But, this query is fine syntax-wise and hence passes the Syntax check. But it fails in the next step of Semantic check where the object names are verified.
But we will not be able to notice whether a query failed at Syntax check or at Semantic check when we run a query from SQL*Plus or any other GUI. Because, everything is handled in one go from user point of view and the errors are sent if the Query fails at any step. Otherwise, we get the final output.
Step 3: Shared pool check
This is an important check. I am planning to write a separte lesson on this. Let us understand briefly here.
Basically, once the query passed both Syntax check and Semantic check, it goes for third check called 'Shared pool check'.
Just to put it briefly, 'Shared pool' is a memory segment present inside every Oracle instance, which retains the recently executed SQL and PLSQL code inside its 'Library Cache' based on LRU algorithm.
So, if parser finds that the query is present inside 'Library Cache' or 'Shared pool', then it is called 'Soft Parse'. It goes to step 5, executes the query and sends the output to whoever requested it.
As simple as that. But, if parser finds that such a query is not present inside 'Shared pool' or 'Library Cache', then it is called 'Hard Parse'. So, Oracle must carry out step 4 first to prepare the query and then go to step 5 finally to execute the query and then send the output to the requestor.
So, the first three steps are always carried out for every SQL Query and they are less expensive.
Step 4:
The step 4 is very expensive or costly. Meaning, it consumes lot of resources to complete this, like CPU, I/O reads, physical reads, extra algorithms to generate mutliple queries and select the best one etc.
Hence, 'Hard Parse' degrades performance. We should keep this in mind always before writing any query. To put it simply for now, avoid hard coding and use bind variables to take the advantage of 'Soft Parse'.
Step 4 happens only in case of 'Hard parse', which is decided in step 3 as we discussed above.
We can split this into two sub-steps.
a. Optimization: The Optimizer generates mutliple plans using various combinations of joins (Nested loop/Sort Merge/Hash), access paths (full table scan/index range scan/index skip scan etc) and join orders.
Finally selects the best plan based on cost. The lower the cost, the better the performance.
b. Row source generation: Query execution plan is generated for the best query
selected in the above step. This is what we see in Explain plan.
We can further make modifications to the query, force the Optimizer to select an even lower cost query by changing access paths, joins, join orders or using Hints. And we can verify if the execution plan got changed by again looking at its Explain plan.
This is called 'Performance tuning' or 'Query Tuning'. Let's not go deep into it now.
None of this happens in case of 'Soft Parse' and hence improves performance.
Step 5: Query Execution
Step 5 is again common for each query irresepctive of whether it is 'Soft Parse' or 'Hard Parse'.
As we already discussed, it executes the SQL Query and sends the output
to the requested program or user.
So this is about it. To wrap up, there are two ways of execution or parsing namely- 'Hard parse' and 'Soft Parse'. And there are 5 steps totally. Steps 1 to 3 are common for every query or for each type of execution/parsing. Step 4 happens only for 'Hard Parse' way of execution and not for 'Soft Parse' way. Step 5 is the final and common step, which finally executes the SQL Query. Use Explain plan to check the execution plan selected by Optimizer and tune the query. Use Bind variables to enable 'Soft Parse'.
read lessLesson Posted on 11/06/2019 IT Courses/Oracle Training/Oracle GoldenGate
GoldenGate Connectivity to Kafka
Ankit Goyal
Have around 9.2 years of I.T. industry experience. Have rich experience in following Oracle Technologies. 1....
Oracle GoldenGate (OGG) connects to Apache/Confluent kafka using GoldenGate for Big Data Adapter. OGG uses the big data for kafka properties file to connect to kafka servers/cluster and stream the data in real time.
All Inserts,Updates, Deletes are streamed as Inserts in Kafka Consumer. Big Data adapter is powerful enough to stream before and after images in case of an update.
You can download the OGG for big data software from Oracle e-delivery website. for more details on Big data connectors, do reach out to me.
Thanks,
Ankit
read lessLesson Posted on 15/12/2018 IT Courses/Oracle Training
Sub Queries in SQL(Structured Query Language)
Phanindra Oruganti
The Sun Technologies Software Training Service was formed in the view of the ever growing demands of...
Writing the Query in one more Query is called Sub Query.
In Oracle SQl Sub Queries are Diveded into two categories
The difference between Simple Sub Queries and Cor-related Sub Queries is in case of Simple Sub Queries the outer side Query Expression can compare with inner side query only once. In the case of Cor-related Sub Queries the outward side query expression can compare with internal side query number of times based on the condition which we have specified.
Simple Sub Queries are the following categories:
Sub Query Comparison Test: In this case, the inner side query can return only one record while comparing we can use any relational operator
Sub Query Membership Test: In this case, the inner side query can return more than one record while comparing we can use 'in' operator and the outer side query expression can compare with any one of the values which are produced by the Sub Query.
Sub Query Quantified Comparison Test: In this case, the inner side query can return more than one record, and the outer side query expression can compare with all the values which are produced by the subquery while comparing we can use operators >any, <any, >all,
Existence Test: To check the existence of record which are satisfying primary key and foreign key relationship between two columns which are existing in the same table.
read less
Answered on 13/11/2018 IT Courses/Oracle Training IT Courses/IT Certifications/Oracle Certification IT Courses/IT Certifications/Oracle Certification/Oracle DBA OCA
Pranit Patil
There are many training institute in Pune for oracle DBA training, but you have to find a right and best among them. You have to consider the teaching staff, teaching quality, training method and mainly placement after training so overall looking at this factor you need to join the best <a href="https://crbtech.in/programmes/dba-training-programme/ ">oracle dba training institute in Pune</a>
read lessAnswered on 24/10/2018 IT Courses/IT Certifications/Oracle Certification IT Courses/Oracle Training IT Courses/IT Certifications/Oracle Certification/Oracle DBA OCA
Aniket Rajendra Bhandare
Html crearion
Looking for Oracle Training
Find best Oracle Training in your locality on UrbanPro.
Lesson Posted on 29/12/2016 IT Courses/Oracle Training/Oracle Developer IT Courses/Oracle Training/Oracle PL/SQL IT Courses/Oracle Training/Oracle Developer/Oracle Developer OCA
SQL - Structured Query Language - DQL Commands - SELECT
Kasyap Kasyap
My Experience : 10+ years experience on Oracle Applications / E-Business Suite Implementation Projects 6+...
Structured Query Language allows to store , manipulate, control and retrieve the information from Relational Database Management Systems. Following are some RDBMS products. Oracle Databse, Microsoft SQL Server, MySQL, PostgreSQL etc.
SQL commands can be categorized under
In this session we will focus on DQL SELECT Statement
SELECT T2. DepartmentName, T1. StudentName, SUM(MARKS)
FROM Students T1, Departments T2, MARKS T3
WHERE T1.DEPTCODE=T2.DEPTCODE
AND T1.STUDENTID=T3.STUDENTID
AND T3.EXAMNAME='SEMESTER 1'
GROUP BY T2. DepartmentName,T1. StudentName
HAVING SUM(MARKS)> 900
ORDER BY T1.StudentName
This is old fashioned way of writing clean SQL statements, New way of writing statements to achieve the same result will be discussed in the actual course.
SELECT Clause: Here one has to list the columns in a table(s) to display as a result of the query. columns can be from the list of tables mentioned in FROM clause. A from clause can have a sub query instead of a physical table or view. we will cover this in detail, don't get lost. We can also use Oracle functions or custom functions to return single value return functions.
FROM Clause: This is to include the tables and optionally subqueries (logical table with in memory)
WHERE Clauase: This is to filter the results of the entire select statement. you can exclude or include certain criteria. Apart from this you also join other tables with appropriate unique column to match appropriate record/row with appropriate record/ row in other table.
GROUP BY Clause: This is to group set of columns to use aggregate functions. example Average sales by city or state etc.
HAVING Clause: This is to filter the group results, unlike where cluase it is applied at the group result. example Average Sales > 10000.
ORDER BY Clause: This is to sort the results using specific selected list of the columns in SELECT clause.
read lessUrbanPro.com helps you to connect with the best Oracle Training in India. Post Your Requirement today and get connected.
Ask a Question
Find best tutors for Oracle Training Classes by posting a requirement.
Find best Oracle Training Classes in your locality on UrbanPro
Post your learning requirement