Providing results of queries, PL-SQL Programming

Assignment Help:

Providing Results of Queries

Expressing queries in SQL is the (big) subject. Here I present just a simple example to give you the flavour of things to come in those chapters. Example is a query expressing the question, who is enrolled on course C1?

Example: A query in SQL

SELECT DISTINCT StudentId, Name

 FROM ENROLMENT

WHERE CourseId = CID ('C1')

Note carefully that Example not a command (hence the absence of a semicolon). It is just an expression, denoting a value -in this case, a table. In SQL the result of a query is always another table. Figure shows the result of Example in the usual tabular form.

1718_Providing Results of Queries.png

                                                                   Figure: Result of query in Example

Explanation:

  1. SELECT DISTINCT StudentId, Name specifies that the result of the WHERE invocation is to be projected over StudentId and Name.
  2. FROM ENROLMENT specifies the table operand for the invocation of WHERE
  3. WHERE CourseId = CID ('C1') specifies that just the rows for course C1 are required.

Related Discussions:- Providing results of queries

Benefit of the dynamic sql pl sql, Benefit of the dynamic SQL: This pa...

Benefit of the dynamic SQL: This part shows you how to take full benefit of the dynamic SQL and how to keep away from some of the common pitfalls. Passing the Names of Sc

Create a sql database, The requirements as follows: Create a folder call...

The requirements as follows: Create a folder called "SECURITY" on the server and upload all your project files to that folder. Please note, the "SECURITY" folder is NOT to be IN

Testing triggers, Demonstrate your knowledge of PL/SQL programming by writi...

Demonstrate your knowledge of PL/SQL programming by writing and thoroughly testing triggers and stored procedures associated with an e-commerce application that provides security l

Package standard, Package STANDARD The package named STANDARD defines t...

Package STANDARD The package named STANDARD defines the PL/SQL atmosphere. The package specification globally declares the exceptions, types, and subprograms that are available

Assignment statement in pl sql, Assignment Statement: The assignment s...

Assignment Statement: The assignment statement sets the present value of the variable, parameter, field, or element. The statement consists of an assignment target followed by

Application to export excel data to mssql server table, Application to Expo...

Application to Export Excel Data to MSSQL Server table I am having a table available in excel format and features the subsequent: - Some text is in Arabic (e.g. UTF-8 encodin

Join query, Using a join on 3 tables, select 5 columns and 10 rows from the...

Using a join on 3 tables, select 5 columns and 10 rows from the 3 tables without the use of a Cartesian product Query: SELECT E.LAST_NAME, E.FIRST_NAME, S.BUILDING, S.BRAN

Natural join - sql, Natural Join - SQL In the absence of NATURAL JOIN...

Natural Join - SQL In the absence of NATURAL JOIN Example has to be replaced by something rather more longwinded, as shown in Example. Example: Joining IS_CALLED and IS_EN

Blocks, Blocks: The fundamental program unit in the PL/SQL is the bloc...

Blocks: The fundamental program unit in the PL/SQL is the block. The PL/SQL block is defined by the keywords BEGIN, DECLARE, EXCEPTION, and END. These keywords partition the b

Introduction to SQl and DQL, which operation is used if we are interested i...

which operation is used if we are interested in only certain columns of a table?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd