Oracle Single Row Numeric Functions

Exam Topic: Using Single-Row Functions to Customize Output - Describe various types of functions available in SQL Single row functions return a result for every row in a result. They can be used in any part of a SQL query, such as the SELECT lists or any part that can use a conditional statement. Oracle 11g has … Continue reading Oracle Single Row Numeric Functions

Change Oracle’s SQLPLUS EDitor

Not everyone wants to use sqlplus' built in editor. It is a bit of a pain and not at all WYSIWYG. Thankfully, changing sqlplus to use another editor is an easy process where you change the _editor session variable to another value. For a more permanent change, you can alternatively change the setting in the … Continue reading Change Oracle’s SQLPLUS EDitor

Ampersand Substitution and Session Variables

Exam Topic: Restricting and Sorting Data - Use ampersand substitution to restrict and sort output at runtime The Ampersand (&) and Double-Ampersand (&&) are used in oracle as prompts for input. They are called "Substitution Variables." They can be used to input a value or dynamically build or modify a statement at runtime. This allows you … Continue reading Ampersand Substitution and Session Variables

Using Expressions in a SELECT FROM DUAL

Exam Topic: Retrieving Data Using the SQL SELECT Statement - Execute a basic SELECT statement In The Capabilities of a SELECT Statement, we talked about returning columns from a table using the SELECT list and a few of the alternatives. In fact, any expression you can think of can be in the SELECT list. An expression is "a combination of one … Continue reading Using Expressions in a SELECT FROM DUAL

Restricting Data – Selection in the WHERE Clause

Exam Topic: Restricting and Sorting Data - Limit the rows that are retrieved by a query Returning the right data by restricting rows to answer questions is at the heart of SQL Development. As shown in The Capabilities of a SQL SELECT Statement, the WHERE clause is used to specify conditions for which rows should be returned. If the … Continue reading Restricting Data – Selection in the WHERE Clause

The Capabilities of a SQL SELECT Statement

Exam Topic: Retrieving Data Using the SQL SELECT Statement - List the capabilities of SQL SELECT statements By far, the most important skill for anyone to possess when working with a database is the skill to extract from the database the data you want in the format you desire. The SELECT statement, therefore, is the most important … Continue reading The Capabilities of a SQL SELECT Statement

Gotchas with the Oracle DATE Datatype

DATE is a common datatype. Most transactions in a database have a date associated with them for tracking purposes. When was the order made? When is the order expected to be delivered? When was it actually delivered? And so on. Querying dates, however, takes some attention to detail as there are many details to consider … Continue reading Gotchas with the Oracle DATE Datatype