午夜精品久久久久久久99老熟妇,天堂中文www官网,未满十八18勿进黄网站,太粗太深了太紧太爽了,天天爽夜夜爽夜夜爽

考試報名
考試報名
考試內(nèi)容
考試大綱
在線客服
返回頂部

備考刷題,請到

CDA認證小程序

Table t1 has id, name and salary columns. If t1 is a post info table for a forum, with id as the poster's ID, name as post title, and salary as points awarded by the forum per post, then: The statement to update field contents in table t1 is:
A. create table t1(id int,name char(30),salary int);
B. drop table t1;
C. create view v_t1 as select id,name from t1;
D. update t1 set name='lixiaoming' where id=100;
上一題
下一題
收藏
點贊
評論
題目解析
題目評論(0)

The UPDATE...SET statement is used to modify field contents in a table.

正確答案是:D: update t1 set name='lixiaoming' where id=100;

分析:
- 選項A: `create table t1(id int,name char(30),salary int);` 這個語句是用于創(chuàng)建一個名為t1的表,并定義了三個字段:id(整數(shù)類型)、name(字符類型,最大長度為30)、salary(整數(shù)類型)。這個語句是創(chuàng)建表結(jié)構(gòu)的,而不是更新表中字段內(nèi)容的。

- 選項B: `drop table t1;` 這個語句是用于刪除名為t1的表。這個操作會刪除整個表結(jié)構(gòu)和表中的所有數(shù)據(jù),同樣不是更新字段內(nèi)容的操作。

- 選項C: `create view v_t1 as select id,name from t1;` 這個語句是用于創(chuàng)建一個名為v_t1的視圖,視圖中包含t1表的id和name字段。視圖是一個虛擬表,它是基于SQL查詢的結(jié)果集,同樣不是更新字段內(nèi)容的操作。

- 選項D: `update t1 set name='lixiaoming' where id=100;` 這個語句是用于更新t1表中id為100的記錄的name字段,將其值更新為'lixiaoming'。這正是更新表中字段內(nèi)容的操作。

綜上所述,只有選項D是用于更新表中字段內(nèi)容的正確SQL語句。