Three Common oracle functions TRIM, TRUNC, and DECODE are used. Today, three functions TRIM, TRUNC, and DECODE are met. The experience is recorded for future reference. 1. TRIM function: used to remove spaces at the beginning and end of a string line. Www.2cto.com select trim ('yichangzyh') "TRIM e.g." FROM dual; TRIM e.g. YICHANGzyh 2. TRUNC function: truncation function. SELECT trunc (sysdate) "trunc (sysdate)" trunc (sysdate, 'Year') "trunc (sysdate, 'month')", trunc (sysdate, 'month ') "trunc (sysdate, 'day')", trunc (sysdate, 'day') ", trunc (sysdate, 'hh24')", trunc (0 minutes 0 seconds )", trunc (sysdate, 'mi ') "intercepted to minutes (0 seconds)" FROM dual; intercepted to the day, intercepted to the first day of the year, intercepted to the first day of the month, intercepted to the first day of the week, the hour (0 minutes 0 seconds), minute (0 seconds), 17:00:00, 17:02:00, 3. DECODE function: Conditional judgment. Www.2cto.com decode (condition, value 1, return value 1, value 2, return value 2 ,... value n, RETURN value n, default value) the meaning of this function is as follows: IF condition = value 1 then return (translation value 1) ELSIF condition = value 2 then return (translation value 2 )...... ELSIF condition = value n then return (translation value n) else return (default value) END IF