CAST 함수 : 데이터형을 변환시키는 함수
ex)
ex)
CAST(0.245 AS VARCHAR)
CAST('2010-03-01' AS DATETIME)
CAST('2010-03-01' AS DATETIME)
SELECT time AS moonjayeol, CAST(time AS DATETIME) AS nalzza
FROM tbl_schedule;
FROM tbl_schedule;
'old > SQL' 카테고리의 다른 글
UPDATE (0) | 2010.03.16 |
---|---|
INSERT (0) | 2010.03.16 |
집합 함수 (AVG, SUM, COUNT, MAX, MIN) (0) | 2010.03.15 |
날짜함수 (GETDATE, DAY, MONTH, YEAR, DATEADD, DATEDIFF (0) | 2010.03.15 |
문자열 함수 (LEN, LENGTH, SUBSTRING, SUBSTR, LTRIM, RTRIM, UPPER, LOWER) (0) | 2010.03.15 |