Put your tips and tricks online - Share your knowledge! Login | Register
 
 
  Search     Advanced search
 

Home | Ask Question | Add tip | Questions | My tips | Recent tips & tricks | Suggest a category | FAQ | Forums

 
 
 
 Category : Home > Databases > MySQL     

How to print SQL query results vertically


In MySQL you can display the query results vertically, so that each column will be shown on a
new line with \G switch. Fox example:

mysql> select * from nuke_phpbb_config \G
*************************** 1. row ***************************
 config_name: config_id
config_value: 1
*************************** 2. row ***************************
 config_name: board_disable
config_value: 0
*************************** 3. row ***************************
 config_name: sitename
config_value: yourdomain.com
*************************** 4. row ***************************
 config_name: site_desc
config_value: A _little_ text to describe your forum
*************************** 5. row ***************************
 config_name: cookie_name
config_value: pnphpbb2mysql
...


  Options
 
   del.icio.us  |  newsvine  |  digg  |  furl  |  google  |  yahoo  |  Ma.gnolia  |  vigillar  |  reddit  |  technorati  |  icerocket  |  pubsub

       Rate this tip:    

Start discussion or add comment to this tip

  Details
Tip reference : #129
views : 426
Added on : 10/26/06
Submited by : webdev
 
Send a message Send a message Printer friendly output Printer friendly output
Display this member's tips Display this member's tips (6)
 
 
<< Previous Next >>
 Most viewed tips 
  Databases > Oracle > Security : How to unlock Oracle user account  
  Operating Systems > Unix : How to kill Unix user session  
  Databases > Oracle > Performance Tuning : How to enable trace in Oracle  
  Databases > Oracle : Kill user session  
   
  All categories
Databases | Programming | Hardware | Operating Systems | Networking | Internet | ERP / CRM | Games & Multimedia | Graphics & Design | Miscellaneous | Office Software | TipLib FAQ
 
 

Home |  FAQ |  Terms of Use |  Privacy Policy

© 2005 tiplib.com