Candy Database            Candy  ( CandyType char(15),                Cost dec(9,2),                Colour char(10))   People ( Personname char(20),                Age smallint,                  Suburb char(20),                  PhoneNumber char(10))   Likes   ( Personname char(20),               CandyType char(15))   Choose the SQL query that will answer the following question using the Candy Database. Update the cost of candy by reducing $1.50, where the first part of the name is the word Caramel ?单项选择题

A

Update Candy Set cost = cost - 1.50 where CandyType like '%Caramel%';

B

Update Candy Set cost = cost - 1.50 where CandyType = '[Cc]aramel%';

C

Update Candy Set cost = cost - 1.50 where CandyType like '_[Cc]aramel%'; Incorrect.  The database will search for one character with anything _ , then a space and then the word Caramel. So Caramel will start in the third character position with any characters after it.

D

Update Candy Set cost = cost - 1.50 where CandyType like 'Caramel%';

登录即可查看完整答案

我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!