Data Interrogation - Teradata

we explored the functionality of the WHERE clause and its ability to test for a column data value was addressed regarding its ability to determine whether or not to return a row. As functional as this is, sometimes it is not powerful enough. When that is the case, we now have NULLIF, COALESCE and CASE (no pun intended) tests.

When relational databases first started appearing everyone was impressed with their ability to use SQL instead of writing a program to get at the desired data. However, as requests became more sophisticated and new requirements emerged, there came a point in time when people thought, "If I only had an IF statement."

Now SQL contains functions to test the data values after a row passes the WHERE test and is read from the disk. These functions not only allow the data to be tested, but also allow for additional logic to be incorporated into the SQL. This logic provides many options regarding the processing of data before it is returned to the client.

Many of the data interrogation functions may be used in either the column name list as well as the WHERE clause. Primarily, these functions are used after the WHERE clause tests determine that the row is needed for the processing of one or more columns.

The Student table below is used to demonstrate the functionality of these functions:

demonstrate the functionality of these functions

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Teradata Topics