SQL 내장함수 예제
-- desc sys.dual-- 절대값select abs(-78), abs(78) from dual;-- 반올림(소수점)select round(4.875,1) from dual;-- 반올림(소수점이상)select custid "고객번호", round(sum(saleprice)/count(*), -2) "평균 금액"from ordersgroup by custidorder by custid;--이름 교체select bookid, replace(bookname, '야구', '농구') bookname, publisher, pricefrom book;select bookid,bookname, publisher, pricefrom book;--글자수, 바이트수select bookname "제목", length(b..
2018. 3. 14.