Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
select * into tbl_Distination from tbl_Source;
Posted

1 solution

MySQL Server doesn't support the SELECT ... INTO TABLE Sybase SQL extension. Instead, MySQL Server supports the INSERT INTO ... SELECT standard SQL syntax

SELECT INTO TABLE[^]
 
Share this answer
 
Comments
PIEBALDconsult 30-Sep-15 1:21am    
INSERT/SELECT is also in SQL Server, but doesn't do the same thing -- SELECT INTO creates and fills the table; INSERT/SELECT doesn't create, only fills -- does it create the table in MySQL?
bhartimithilesh 30-Sep-15 1:24am    
insert into tbl_Distination select * from tbl_Source;

not working.
DamithSL 30-Sep-15 1:34am    
what is the error you get? have you check the column data types & sizes etc.. machine with destination or not? try to give column names like below
INSERT INTO tbl_temp2 (fld_id)
SELECT tbl_temp1.fld_order_id
FROM tbl_temp1
Maciej Los 30-Sep-15 2:03am    
5ed!
DamithSL 30-Sep-15 6:55am    
Thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900