Skip to main content

Posts

Showing posts from April, 2023
  COGNIZANT Freshers   ORACLE Training @  Pune 2014 What is Embedded SQL in DBMS?  When we talk about embedded SQL, it can be understood as small SQL queries put into high-level languages to get meaningful outputs. While embedding SQL queries into other high-level languages, we need to make sure that we have a working database connector on our system. By using the connectors we can easily run SQL queries on the existing databases in our RDBMS or we can even create new ones. Let us now dive deep into the embedded SQL concepts and learn more about it. What is Embedded SQL? As we have seen in our previous tutorials, SQL is known as the Structured Query Language. It is the language that we use to perform operations and transactions on the databases. When we talk about industry-level applications we need properly connected systems which could draw data from the database and present to the user. In such cases, the embedded SQL comes to our rescue. We embed SQL queries...

Rank , Dense_Rank() and Row_Number()

                       Training Facility ,  Capgemini @ Pune - Freshers training program                     Rank , Dense_Rank() and Row_Number()   The RANK, DENSE_RANK and ROW_NUMBER functions are used to retrieve an increasing integer value. They start with a value based on the condition imposed by the ORDER BY clause. All of these functions require the ORDER BY clause to function properly. In case of partitioned data, the integer counter is reset to 1 for each partition.   RANK Analytic Function The basic description for the  RANK  analytic function is shown below. The analytic clause is described in more detail  here . RANK() OVER ([ query_partition_clause ] order_by_clause) Let's assume we want to assign a sequential order, or rank, to people within a department based on salary, we might use the  RANK  function ...