use/create/select/insert/delete/update
use pnudb; # pnudb를 사용하겠다.
select count(*) from gisa1; # gisa1의 개수를 count한값을 보인다.
create table test( # test 테이블을 작성한다.
id varchar(20) not null,
pw varchar(8) not null,
user_name varchar(30) not null # 마지막은 ','를 찍지않는다.
);
select * from test; # test 테이블을 보여라!
desc test; # test테이블의 field type null default 등을 보여준다.(id / varchar(20) /NO/NULL)
insert into test(id,pw,user_name) values ('admin','1234','kim'); # test table에 값을 추가한다.
insert into test(id,pw,user_name) values ('dev','1234','lee');
insert into test(id,pw,user_name) values ('tester','1234','choi');
insert into test(id,pw,user_name) values ('user1','1234','ahn');
insert into test(id,pw,user_name) values ('user2','1234','park');
delete from test where id='admin'; # test table 에서 id가 admin인건 다지운다.
update test set pw='2345' where id='admin'; # id가 admin인 값에 대해서 비밀번호를 2345로 수정한다.