0

I want to view one row of a table in a MySQL database to see what kind of information is stored in the table. What is the MySQL command and syntax to accomplish this, after > use [database_name] This table has over 3 Million rows, so I don't want to risk printing them all.

MySQL Version 14.14 Distrib 5.5.53, for debian-linux-gnu (x86_64) using readline 6.3

  • Sorry, I just realized that I probably posted in the wrong SE community. – Christia Dec 27 '16 at 9:49
2

Append LIMIT 1 to your query. Ex:

SELECT * FROM Users LIMIT 1;

2

You can use LIMIT for limiting row count. Like this:

SELECT column from someTable LIMIT 1;

If you don't know what kind of columns the table has, you can check them using DESC:

DESC table;

Heres a small example built with sqlfiddle http://sqlfiddle.com/#!9/dcb16/57697

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.