Removes characters from the beginning and end of a string. By default, removes whitespace.
STRINGDiperbarui: 13 Jun 2026TRIM(value [, characters])The string to trim
Characters to remove (default: whitespace)
1 SELECT TRIM(' Hello World ') as result;
Removes leading and trailing spaces.
1 SELECT TRIM('###Hello###', '#') as result;
Removes # characters from both sides.
1 SELECT 2 TRIM(product_name) as clean_name, 3 TRIM(LOWER(category), ' -_') as clean_category 4 FROM `project.dataset.products`;
Cleans up unnecessary whitespace and characters.
Sudah paham TRIM? Latih langsung di browser
Latihan interaktif, langsung di browser.