假定有一个数据表,表名叫tom
|----|---------|
| id | content |
| 1 | john |
| 2 | tom |
| 3 | grace |
| 4 | jack |
| 5 | lily |
如果要查询表格中所有数据,sql语言语法格式是
select 字段名 from 表名;
如果要查询tom表的所有内容
sql
selcect id,content from tom;
或者
sql
select * from tom;
如果只是想查id字段列
sql
select id from tom;