MySQL Select

MySQL Select

MySQL select syntax and examples.

MySQL Select syntax

SELECT * FROM table_name;

SELECT col1, col2 FROM table_name;

SELECT col1, col2 FROM table_name WHERE condition;

Table test

ID NAME
1 abc
2 def
3 ghi
4 jkl

Select example

SELECT * FROM test WHERE id=1;

Query Result

ID NAME
1 abc