Loading
2014. 3. 28. 13:31 - citybell.com

SQL MySQL script : INSERT, UPDATE, DELETE 예제

CREATE TABLE  user
(
   name     char(16)  NOT NULL ,
   age        integer,
   email      vchar(100),
   userid     char(16) NOT NULL , 
   passwd   char(16)  
) 


INSERT   INTO user VALUES( "홍길동", 22, "gil@hotmail.com", "gildong",  "x123")  ;

UPDATE  user  SET   age=33,   email="gil@naver.com"  WHERE  name = "홍길동" ;

DELETE  FROM user WHERE age > 30 ;

DELETE  FROM  user ;


관련된 글: SELECT 예제
관련된 글: CREATE, DROP 예제
관련된 글: Replace 예제

 

 

  • Total
  • Today
  • Yesterday
  • Total
  • Today
  • Yesterday