Avoid using SELECT * There are many reasons for that recommendation, like: SELECT * Retrieves unnecessary data besides that it may increase the network traffic used for your queries. When you SELECT *, it is possible to retrieve two columns of the same name from two different tables (when using JOINS for example).
Select the header or the first row of your list and press Shift + Ctrl + ↓(the drop down button), then the list has been selected except the first row. Note: If there are blank cells in your list, it will select the list until the first blank cell appears with this method.
For duplicating an entry I would like to use the following syntax:
insert into TABLE select * from TABLE where ...
However, as the first column is an auto-increment primary key, this value must be different. My workaround was to specifiy all fields in the select query instead of using the asterisk and then leaving the primary key field blank. Since my table has more than thirty fields that unfortunately keep changing, I am looking for a solution that I can implement in a script and that does not need to be modified when the table structure changes. Any ideas? Thank you very much!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With