SSC-EWI-TD0031
The result may differ due to char type having a fixed length in Teradata
Severity
Description
Example Code
Input:
CREATE TABLE table1
(
col1 VARCHAR(36),
col2 CHAR(36)
);
INSERT INTO table1 VALUES ('Gabriel', 'Gabriel');
INSERT INTO table1 VALUES ('Barnum', 'Barnum');
INSERT INTO table1 VALUES ('Sergio', 'Sergio');
SELECT col1 FROM table1 where col1 LIKE 'Barnum';
-- The result is a single row with 'Barnum'
SELECT col2 FROM table1 where col2 LIKE 'Barnum';
-- It does not return any rowOutput:
Recommendations
Last updated
