Computer >> Computer tutorials >  >> Programming >> MySQL

Print structured MySQL SELECT at command prompt


To print, the syntax is as follows −

mysql -uroot -t -e "your Select Query  " -p

To implement the above syntax, let us open the command prompt −

Print structured MySQL SELECT at command prompt

Now, reach the MySQL bin −

Print structured MySQL SELECT at command prompt

Let us implement the above syntax to easily print structured SQL select. Following is the query −

Print structured MySQL SELECT at command prompt

This will produce the following output −

Print structured MySQL SELECT at command prompt

Print structured MySQL SELECT at command prompt