Rendering MySQL query results in vertical format
Database,Easily reviewing SELECT query results in a shell window can be particularly difficult when a table consists of numerous columns. Remedying this inconvenience is easily done by appending the \G switch to the query: mysql>SELECT * from users WHERE id=1\G Executing this query with the \G switch attached formats the output like so: mysql test>select…
Read moreConverting MySQL query results into a CSV file
Database,To dump data from the database into an Excel file, SELECT query can be used to convert data to CSV formatting. Converting MySQL query results into a CSV file All...
Read moreHow to change the client prompt in MySQL?
Database,Change MySQL’s prompt by using the prompt command: mysql>prompt mysql (\d)> Once executed, the currently selected database will appear in the prompt, like so: mysql (mydatabase)> It’s also easy to lose track of which database server you’re logged in to, not to mention which account you’re using. To fix this, modify your prompt using the…
Read more
