Subquery on MySQL5
มีเรื่องต้องใช้งาน MySQL5 และต้อง mock ข้อมูลขึ้นมาเยอะๆ ก็เลยลองไปดูว่า MySQL เขียน Sub Query ได้มั้ย จะได้ดึง select ข้อมูลแล้ว insert กลับเข้าไปหลายๆ row
INSERT INTO hotel SELECT * FROM hotel h where hid=1
For more information: MySQL5 Subquery Syntax
Related posts:
- MySQL: Packet for query is too large
- MySQL Workbench
- 9 ขั้นตอนในการ Install Apache, PHP, MySQL บน Mac OS X 10.6 (Show Leopard)
- WWW SQL Designer
- Oracle and her Sun
Tags: Database, MySQL
This entry was posted
on Thursday, February 1st, 2007 at 4:37 pm and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
อืม.. ถ้าผมจำไม่ผิด Oracle ทำแบบนี้ไม่ได้ แต่ Sybase ก็ทำได้เหมือนกัน
Sybase กับ SQL Server ไม่แน่ใจ แต่ Oracle ทำได้นะ เขียนเหมือนกันเลย เพราะ MySQL ลอกเขามา