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

Christia
  • 215
  • 3
  • 13

2 Answers2

2

Append LIMIT 1 to your query. Ex:

SELECT * FROM Users LIMIT 1;

Zwans
  • 70
  • 3
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

StefanR
  • 1,382
  • 6
  • 13