Language English English Español Español Deutsch Deutsch Português Português
🇬🇧 English 🇪🇸 Español 🇩🇪 Deutsch 🇧🇷 Português
Language:EnglishEnglishEspañolEspañolDeutschDeutschPortuguêsPortuguês

Working Around SELECT INTO for mySQL

mySQL does not support the “SELECT * FROM … INTO …” sybase SQL extension. That seemed a real bummer for me since I use that a lot in my work and wanted to use it while I was trying to repair my cocktail recipe database which was full of rubbish because I don’t check the input to the table.

After a bit of searching around I found that you could replicate this in two simple ways:

Using the CREATE … SELECT Method: This is a really simple way to fix the problem, if you have experience with the existing “SELECT” method you can use that to create a new table with exactly the same properties as the table you are selecting from.

In fact this method is really flexible since you can insert any column you wish into the new table.

This made my life a lot easier and I hope it makes your life easier too.

Get my marketing cheat sheets at Click Here

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *