일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- 상속
- 페이징
- Login with OAuth Authentication
- 단축키
- 이클립스
- 다형성
- 가변인자
- 업캐스팅
- Full text
- 야구게임
- angular2
- Validations
- 형변환
- 추상클래스
- 전체
- while
- 로또
- Random
- 전체텍스트
- IBatis procedure
- full text indexing
- 자바
- 스프링
- 자바 야구게임
- 다운캐스팅
- jquery
- 상속예제
- 25가지 효율적인 sql작성법
- 전자정부
- Today
- Total
목록MYSQL (16)
nalaolla
1. 새로운 사용자 등록 (GRANT 이용)(1) MySQL에서 모든 권한을 갖는 관리자용 사용자(root)를 추가할 때mysql> GRANT ALL PRIVILEGES ON *.* to root@localhost IDENTIFIED BY 'password' \ WITH GRANT OPTION;(2) 일반 사용자(user)에게 자신의 DB(mydb)의 모든 테이블에 모든 권한을 부여할 때mysql> GRANT ALL PRIVILEGES on mydb.* to user@localhost IDENTIFIED BY 'password';2. MySQL의 root 사용자 암호 바꾸기 (mysqladmin 이용) (1) root 패스워드 변경하기.mysql> mysqladmin -u root password new..
case prog_gb_cd 컬럼값이 1이면 '접수' , 2이면 '처리중', 3이면 '완료' , 나머지는 '미접수'라고 찍는다. select case prog_gb_cd when 1 then '접수' when 2 then '처리중' when 3 then '완료' else '미접수' end from WRK_INC_DECL case~when은 오라클이나 MS-SQL이나 다 사용방법이 같다..그냥 쓰면 된다..ㅋ
mysql> help Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 5.0.68-enterprise-log MySQL Enterprise Server (Commercial)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> helpFor information about MySQL products and services, visit: http://www.mysql.com/ For developer information, including the MySQL Reference Manual, visit: h..
[저장된 프로그램에 인베디드된 쿼리문] create procedure example1() begin declare l_book_count integer; select count(*) into l_book_count from books where author like '%HARRISON,GUY%'; select concat('Guy has wriitten (or co-written) ', l_book_count , ' books.'); update books set author = replace(author, 'GUY', 'GUILLERMO') where author like '%HARRISON,GUY%'; end [제어와 조건 로직을 가진 저장 프로시져] create procedure pay_out_ba..
[간단한 저장 프로시져] delimiter// drop procedure if exists helloworld// create procedure helloworld() begin select 'Hello World"; end// delimiter; mysql> call helloworld(); [저장 프로시져 안에 변수들] delimiter// drop procedure if exists variable_demo() create procedure variable_demo()begin declare my_integer int; declare my_big_integer bigin; declare my_currency numeric(8,2); declare my_pi float default 3.1415926..
1. 숫자 관련 함수▶ ABS(숫자) - 절대값 출력. ▶ CEILING(숫자) - 값보다 큰 정수 중 가장 작은 수. ▶ FLOOR(숫자) - 값보다 작은 정수 중 가장 큰 수[실수를 무조건 버림(음수일 경우는 제외)]. ▶ ROUND(숫자,자릿수) - 숫자를 소수점 이하 자릿수에서 반올림.(자릿수는 양수,0,음수를 갖을 수 있다.) ▶ TRUNCATE(숫자,자릿수) - 숫자를 소수점 이하 자릿수에서 버림. ▶ POW(X,Y) or POWER(X,Y) - X의 Y승 ▶ MOD (분자, 분모) - 분자를 분모로 나눈 나머지를 구한다.(연산자 %와 같음) ▶ GREATEST(숫자1,숫자2,숫자3...) - 주어진 수 중 제일 큰 수 리턴. ▶ LEAST(숫자1,숫자2,숫자3...) - 주어진 수 중 제일 ..