Copy table in sql
posted on 05 Jan 2009 15:09 by tazaii in DatabaseHow to create table from old table that exist >>
create table <table_new> select * from <table_to_copy>
Tags: create, database, sql, table0 Comments
How to create table from old table that exist >>
create table <table_new> select * from <table_to_copy>
List of all table in database
SELECT * FROM information_schema.Tables
วิธีลบ record ในตารางโดยให้ค่า auto increment เริ่มต้นที่ 1ใหม่อีกครั้ง
DELETE FROM table_name;
ALTER TABLE table_name AUTO_INCREMENT = 1;