1. string to datetime

   * cast('20210611021310' as datetime)

   * cast('2021-06-11 02:13:10' as datetime)

   * STR_TO_DATE('2021-06-11 02:13:10','%Y-%m-%d %H:%i:%s')

2. string to number

  (signed : 부호를 가지는 값 양수 음수 구별 가능, unsigned : 부호를 가지지 않는 값)

  * cast('202123.4545' as unsigned)

 * float 형태 소수점 있는 숫자

 * cast('202123.4545' as decimal(10,2))

+ Recent posts