Teradata database space query

As a Teradata Admin or Developer you may want to know the database space utilization in Teradata system. This will provide a clear picture about how the spaces are allocated over the different databases. Following Teradata database space query will … Read more »

Teradata Joins

Joins mean joining more than one table based on the common columns/values from these tables. Joins are helpful to get meaningful data for business queries. Teradata supports different kinds of join as below. Inner Join. Left Outer Join. Right Outer … Read more »

Teradata RANK Function

Teradata RANK function assigns the ranking(1…n) of rows in the result set based on the value of the sort_expression list. The rows with the same value receive the same rank in Teradata. You may also specify the sorting order in … Read more »

Qualify Clause in Teradata

The Qualify clause filters the results of a previously computed ordered analytical function according to user-specified search conditions. The Qualify clause works similarly to the HAVING clause. But the major difference between Qualify and HAVING is that with Qualify the … Read more »

ABS Function in Teradata

ABS function calculates the absolute value of a given value. ABS Function in Teradata Syntax ABS(number_value) ABS Function in Teradata Example SELECT ABS(10); Output: 10 SELECT ABS(-10); Output: 10 SELECT ABS(+10) Output: 10 Teradata ABS function converts the negative value … Read more »

Teradata Identity Column

The identity column in a table defines a column that generates the value automatically once you define that column as Identity. You do not require to insert any values explicitly for the Identity column. Teradata itself takes care of the … Read more »

SUBSTR in Teradata

SUBSTR or SUBSTRING function works same in Teradata. Only the syntax is different. Syntax: SUBSTR ( <column-name>, <start-location> [ , <length> ] ) Example: SELECT SUBSTR(‘TeradataPoint’, 4 , 4), SUBSTR(‘TeradataPoint’, 2 , 6), SUBSTR(‘TeradataPoint’, 8 , 4), SUBSTR(‘TeradataPoint’, 4 , … Read more »

Teradata Subquery

Teradata subquery is basically a SELECT query within a query. The SELECT query called as inner query executed first and the outer query uses the result from the subquery. Below are some of the features of the subquery. A query … Read more »

Concatenation Operator || in Teradata

Concatenation Operation in Teradata joins two strings provided inside the single quote. Concatenation operator works similar to CONCAT function. This operator mainly used in the SELECT statement. Concatenation is the process of combining two or more column into one single … Read more »

Teradata TOP Function

The TOP function is used to produce ‘N’ rows from the table based on specific criteria. Also it produces The TOP N percentage of row from the table. All the identical values if WITH TIES option is used with sorting … Read more »