UrbanPro
true

Find the best tutors and institutes for Oracle Developer

Find Best Oracle Developer

Please select a Category.

Please select a Locality.

No matching category found.

No matching Locality found.

Outside India?

Search for topics

SQL - Structured Query Language - DQL Commands - SELECT

Kasyap Kasyap
29/12/2016 0 1

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

  1. DDL - Data Definition Language      (CREATE, DROP, ALTER)
  2. DML- Data Manipulation Language   (INSERT, DELETE, UPDATE)
  3. DCL- Data Control Language            (GRANT, REVOKE)
  4. DQL- Data Query Language              (SELECT)

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.

0 Dislike
Follow 1

Please Enter a comment

Submit

A

Aditi | 05 Jan

Thanks a lot!

0 0

Other Lessons for You

How to use joins in SQL
What are Joins in SQL? Joins in SQL are used to combine rows between two or more tables. Joins are used in SQL when user need to extract data between two or more tables based on a related column. Joins...

Sagar Waikar | 02/12/2020

0 0
0

How does a SQL Query Execute inside Oracle? What are the steps followed in the background?
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....

Gavi Y. | 05/01/2020

0 0
0

Interview questions based on "level", a pseudocolumn
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 ...

Gavi Y. | 05/01/2020

0 0
0

Sub Queries in SQL(Structured Query Language)
Writing the Query in one more Query is called Sub Query. In Oracle SQl Sub Queries are Diveded into two categories Simple Sub Queries Cor-related Sub Queries The difference between Simple Sub Queries...

Phanindra Oruganti | 15/12/2018

0 0
0

How To Create The Java Souce In Oracle PLSQL?
Requirement: How to find the list of files in specified directory? Step1 : First find the JDK Install or not in the oracle, to find jdk version please run the below sql. SELECT dbms_java.get_ojvm_property(PROPSTRING=>'java.version')...

Murali Krishna | 30/06/2017

0 0
0

Looking for Oracle Developer ?

Find best Oracle Developer in your locality on UrbanPro.

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
Sponsored
X

Looking for Oracle Developer Classes?

Find best tutors for Oracle Developer Classes by posting a requirement.

  • Post a learning requirement
  • Get customized responses
  • Compare and select the best

Looking for Oracle Developer Classes?

Find best Oracle Developer Classes in your locality on UrbanPro

Post your learning requirement

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more