Ben Chuanlong Du's Blog

It is never too late to learn.

String in SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Teradata

regexp_instr REGEXP_LIKE REGEXP_REPLACE REGEXP_SUBSTR

  1. trim trim specified pad characters or bytes from a character or byte string

  2. like %, _ like, case-insensitive You can also like any (pattern_1, pattern_2, ...) like all …

Primary Key vs Index in SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. index is for distribution data index does not have to be unique

  2. primary key must be unique and non null

  3. primary keys are automatically indexed

Auto Increment in SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

http://plsql4all.blogspot.com/2014/08/auto-increment-column-in-teradata.html http://stackoverflow.com/questions/21982004/how-to-generate-automatic-number-in-teradata-sql https://forums.teradata.com/forum/enterprise/auto-increment-column

  1. Be careful with batch insert if there is an auto …