Home > MySQL > 테이블 복사

테이블 복사

November 23, 2008 Leave a comment Go to comments

 

target_db : 새롭게 생성될 테이블이 존재하는 테이터베이스

target_table_name : 새롭게 생성될 테이블 이름

 

source_db : 복사할 원본 테이블이 존재하는 테이터베이스

source_table_name : 복사할 원본 테이블 이름

 

create table target_db.target_table_name (select * from source_db.source_table_name);

또는

create table target_db.target_table_name as select * from source_db.source_table_name;

  1. No comments yet.
  1. No trackbacks yet.