考试报名
考试报名
考试内容
考试大纲
在线客服
返回顶部

备考刷题,请到

CDA认证小程序

The table "t1" has three columns: "id," "name," and "salary." If "t1" represents a forum's posting information table, where "id" is the poster's ID, "name" is the post's title, and "salary" is the score awarded for each post on the forum. To view the rows in the "t1" table where "id" is equal to 10, the correct query is:
A. select id from t1 id=10;
B. select id from t1 where id=10;
C. select id from t1 id 10;
D. select id from t1 where id 10;
上一题
下一题
收藏
点赞
评论
题目解析
题目评论(0)

When you want to view specific rows, you need to use the WHERE clause along with a condition.

正确答案是:B: `select id from t1 where id=10;`

专业分析如下:

1. **选项A: `select id from t1 id=10;`**
- 这个查询语句是错误的。它缺少关键字`where`来指定条件。

2. **选项B: `select id from t1 where id=10;`**
- 这个查询语句是正确的。它使用了`where`关键字来指定条件,表示从表`t1`中选择`id`等于10的行。

3. **选项C: `select id from t1 id 10;`**
- 这个查询语句是错误的。它缺少`where`关键字,并且语法不正确。

4. **选项D: `select id from t1 where id 10;`**
- 这个查询语句是错误的。它缺少等号`=`来指定条件。

综上所述,选项B是正确的查询语句。