How to view data in a table via SQL console?

  • on your second question you can read my answer - BOPOH
  • author, are you interested in MySQL database? - AntonioK

2 answers 2

You can view the data in the table through the execution of a SELECT * FROM tableName;

  • but different? For example, this is how we look at all the tables in the database — show tables; - user22940
  • one
    What are you not comfortable with SELECT * FROM tableName? - Vladimir Martyanov
  • I want to know what to use - int (here is the size, by default it is equal to 11). It is assumed that if you set 1 then more than one number in the console will not appear. - user22940
  • @semiromid int - integer (i.e. digits), 11 - number of digits - mix

Console clients have special commands that display information about the table. For example, in psql there is a \d+ name_table , which shows record fields and comments to them.