How to display data in a table in MySQL?
To display data in a MySQL table, you can use the SELECT statement. Here is an example:
SELECT * FROM 表名;
In which, the table name is the name of the table that the data will be displayed from. An asterisk (*) represents selecting all columns. If you only want to select specific columns, you can replace the asterisk with the column names, separating multiple column names with commas.
For example, to display all columns of all data in a table named users, you can use the following statement:
SELECT * FROM users;
To display only the data of the name and age columns, you can use the following statement:
SELECT name, age FROM users;
After executing the above statement, MySQL will return the data in the table.