본문 바로가기
MYSQL

명령어(작성중)

by 리틀홍콩 2016. 12. 7.
728x90

 

1. 테이블 생성 쿼리 조회

  

    show create table db.tablename

 

2. 테이블 권한주기(모든권한)

 

   grant all privileges on dbName.tableName to '계정명'@'%';

 

3. 프로시저 권한주기

 

   grant execute on procedure procedureName to '계정명'@'%';

 

 함수

 설명

 예시

floor 

소수점 자리수 그냥 버림

select floor(4.8) -> 4

select floor(4.2) -> 4 

round

소수점 이하 자리에서 반올림(콤마 후 숫자는 소수점자리 반올림할 대상)

select round(4.8) -> 5

select round(4.2251,1) -> 4.2

select round(4.2251,2) -> 4.23

 

 

 

 

'MYSQL' 카테고리의 다른 글

workbench에서 import시 주의  (0) 2017.01.09
MySQL 지정단어를 컬럼값으로 사용방법  (0) 2017.01.04
MySQL 설치  (0) 2016.12.06
커서란?  (0) 2016.12.05
Sqldevelper에 Mysql접속하기  (0) 2015.06.25

댓글