Home > Database > SQL Insert Into Select Dan Select Into Statement

SQL Insert Into Select Dan Select Into Statement

September 22, 2013 Leave a comment Go to comments

Berikut ini dua trivia SQL statement.

  • Insert into select statement digunakan untuk men-copy isi suatu table ke table yang sudah ada / exist.

Syntax :

INSERT INTO tbl_name_1 SELECT column_name(s) FROM tbl_name_2

  • Select into statement digunakan untuk mencopy isi suatu table ke table baru.

Syntax ( MySQL ) :

CREATE TABLE tbl_name_new SELECT column_name(s) FROM tbl_name

Semoga bermanfaat.

  1. October 14, 2013 at 14:47

    ente dosen kuh?? banyak materi kuliah gini.. haha

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: