Teradata – Table Types
Teradata supports the following table types to hold temporary data. Derived TableVolatile TableGlobal Temporary Table Derived Table Derived tables are created, used and dropped within a query. These are used…
Teradata supports the following table types to hold temporary data. Derived TableVolatile TableGlobal Temporary Table Derived Table Derived tables are created, used and dropped within a query. These are used…
A subquery returns records from one table based on the values from another table. It is a SELECT query within another query. The SELECT query called as inner query is…
Join is used to combine records from more than one table. Tables are joined based on the common columns/values from these tables. There are different types of Joins available. Inner…
Primary index is used to specify where the data resides in Teradata. It is used to specify which AMP gets the data row. Each table in Teradata is required to…
This chapter explains the CASE and COALESCE functions of Teradata. CASE Expression CASE expression evaluates each row against a condition or WHEN clause and returns the result of the first…
Teradata supports common aggregate functions. They can be used with the SELECT statement. COUNT − Counts the rowsSUM − Sums up the values of the specified column(s)MAX − Returns the large value of…
Teradata provides built-in functions which are extensions to SQL. Following are the common built-in functions. FunctionResultSELECT DATE;Date--------16/01/01SELECT CURRENT_DATE;Date--------16/01/01SELECT TIME;Time--------04:50:29SELECT CURRENT_TIME;Time--------04:50:29SELECT CURRENT_TIMESTAMP;Current TimeStamp(6)--------------------------------2016-01-01 04:51:06.990000+00:00SELECT DATABASE;Database------------------------------TDUSER
This chapter discusses the date/time functions available in Teradata. Date Storage Dates are stored as integer internally using the following formula. ((YEAR - 1900) * 10000) + (MONTH * 100)…
Teradata provides several functions to manipulate the strings. These functions are compatible with ANSI standard. Sr.NoString Function & Description1||Concatenates strings together2SUBSTRExtracts a portion of a string (Teradata extension)3SUBSTRINGExtracts a portion…
SET operators combine results from multiple SELECT statement. This may look similar to Joins, but joins combines columns from multiple tables whereas SET operators combines rows from multiple rows. Rules…