mysqldump for tables with white spaces

The usual command to take a dump for a single table is mysqldump -u root -p dbname tablename > filename.sql But what about table names that have white spaces in between like Order Master? While this kind of naming should be avoided but nevertheless they are perfectly valid. These kind of names are often enclosed […]

MYSQL select all columns except one

Today a thought occurred to me of how to select all columns except one. I searched and found the answer in stackoverflow. I tried the below answer This gives error when column names contains spaces or – or MySQL keywords.I modified the code a bit and generalized it by adding backticks to the column names. […]

MySQL Integer data types with length

We have come across integer data types like INT, TINYINT etc. While creating/modifying a column we generally give a length to it like INT(10). Today I really found its usefulness. Often it is documented that the length just specifies how many characters to display when selecting data. But the length only works only when the […]