Mysql 문법

JS HTML PHP 2011. 5. 19. 01:39


 

Mysql 기본 용법



show databases;
use profile;
show tables; 머머 있는지 나옴
desc 테이블 이름 ; member가 머가 있는지 나옴
* 모든 컬럼.  where는 레코드 (가로 개념)
select * from 테이블이름 ; 실제 내용을 보여줌.
select count(*) from 테이블이름
select email from 테이블이름;

수정하려면
update 테이블이름 set uage = 20 (세로)    ; where가 없으면 세로가 다 20으로 바뀜.
where unum = 2 ; 
insert test(uid, uname) vlaues ('hong', '홍길동');
delete from 테이블 where num=1;



db user 등록
mysql> grant all privileges on DB명.* to DB사용자@localhost identified by '패스워드' with grant option;
ex) grant all privileges on TestDB.* to TestUser1@localhost identified by '패스워드' with grant option;

'JS HTML PHP' 카테고리의 다른 글

Java Script + HTML  (0) 2011.06.03
HTML css  (0) 2011.06.01
HTML Frame Table anchoring  (0) 2011.06.01
HTML Summary  (0) 2011.06.01
웹 프로그래밍 구조  (0) 2011.05.30

설정

트랙백

댓글