网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

【其它】请完成本次上机实训,将答案保存为图片,然后上传图片! 解题思路: 1、约束price 字段(浮点类型)的值在1.00-100.00之间的check约束为:price ﹥=1.00 and price ﹤=100.00 2、设置时间默认值,用getdate(),或用'2019-12-12' 3、唯一键: unⅰque(product_name)


参考答案和解析
实训1.doc
更多 “【其它】请完成本次上机实训,将答案保存为图片,然后上传图片! 解题思路: 1、约束price 字段(浮点类型)的值在1.00-100.00之间的check约束为:price ﹥=1.00 and price ﹤=100.00 2、设置时间默认值,用getdate(),或用'2019-12-12' 3、唯一键: unⅰque(product_name)” 相关考题
考题 (1)将考生文件夹下的自由表“朋友”添加到数据库“DB1”中。(2)为表“朋友”增加字段“年龄”,类型和宽度为“数值型(2)”。(3)设置字段“年龄”的默认值为“18”。(4)为表“朋友”的字段“年龄”设置完整性约束,要求年龄大于或等于18,否则提示信息“请输入合适年龄”。

考题 听力原文:Theoretically, the forward price for a currency can be identical with the spot price. However, it in practice is almost always either higher or lower than the spot price.(6)A.The forward price for a currency is always the same with the spot price.B.The forward price for a currency is always different from the spot price.C.Theoretically, the forward price is almost always either higher or lower than the spot price.D.Theoretically, the forward price for a currency is always the same with the spot price.

考题 The PRODUCTS table has these columns:PRODUCT_ID NUMBER(4)PRODUCT_NAME VARCHAR2(45)PRICE NUMBER(8,2)Evaluate this SQL statement:SELECT *FROM PRODUCTSORDER BY price, product _ name;What is true about the SQL statement? ()A. The results are not sorted.B. The results are sorted numerically.C. The results are sorted alphabetically.D. The results are sorted numerically and then alphabetically.

考题 有如下类定义:class Bag {public:Bag(int p,char s='M'):price(p),size(s) { count++; }~Bag() { count--; }int GetPrice() { return price; }int GetPrice() const { return price; }void SetPrice(int val) const { price=val; }private:int price;char size;static int count;};下列关于类成员的叙述中,正确的是( )。A. 成员函数GetPrice存在重定义B.构造函数的参数不能设置默认值C.析构函数中不能访问静态数据成员D.成员函数SetPrice不能定义为常函数

考题 使用SQL语句将表s中字段price的值大于30的记录删除,正确的命令是( )。A.DELETE FROM S FOR price30B.DELETE FROM sWHERE price30C.DELETE S FOR pricC30D.DELETE S WHERE pricC30

考题 使用SQL语句将表S中字段price的值大于30的记录删除,正确的命令是A.DELETE FROM s FOR price30B.DELETE FROM s WHERE price30C.DELETE s FOR price30D.DELETE s WHERE price30

考题 价格;条款;花费(  )。 A.price;spend;terms B.price;spend;terms C.price;terms;spend D.terms;price;spend

考题 BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTimePublishTime是datetime类型。显示图书的最高价、最低价、平均价、最高价与最低价之间的差值。SQL语句:SELECTMAX(Price)As最高价,MIN(Price)As最低价,Str(AVG(Price),6,2)As平均价()As最高价与最低价的差值FromBookA、(MAX-MIN)PriceB、MAX(Price)-MIN(Price)C、(MAX-MIN)(Price)D、MAX:Price-MIN:Price

考题 BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTimePublishTime是datetime类型。将Book表中的所有“外语”类图书的价格降低10%,并将折扣均设为8折。SQL语句:UPDATEBookSET()WhereBookSort=‘外语‘。A、Price=Price*0.9,Discount=0.8B、Price=Price*(1-10%),Discount=0.8C、Price=0.9,Discount=0.8D、Discount=0.8,Price=Price*0.9

考题 在电商平台数据库中的订单表设计时,将下单时间默认值设置为GetDate()是合理的。

考题 结构的默认值是通过将所有值类型字段设置为它们的默认值,并将所有的引用类型字段设置为()

考题 已知xml文档包含如下内容(list为根元素): <list> <item id="0001"> <price>18</price> </item> <item id="0002"> <price>15</price> </item> <item/> <product> <item id="01"></item> </product> </list> 使用xslt进行转换时,语句<xsl:template match=”/list/item[@id]”>能够匹配到()个item元素。A、3B、2C、1D、0

考题 现有表book,字段:id(int),title(varchar),price(float);其中id字段设为标识,使用insert语句向book表中插入数据,以下语句错误的是()。A、insert into book (id,title,price) values(1,'java',100)B、insert into book (title,price) values('java',100)C、insert into book values ('java',100) 这辆都不可以啊,如果不指定列需要明确的给出空值D、insert book values('java',100)

考题 通常情况,SQL Server 2005主要支持PRIMARY约束、UNIQUE约束、CHECK约束、DEFAULT约束、FOREIGN约束。()在定义列时,它可以为表中的指定列提供默认值。A、FOREIGN约束B、DEFAULT约束C、UNIQUE约束D、CHECK

考题 表book中包含三个字段:title(varchar),author(varchar),price(float)。Author的默认值是’UNKNOW’,执行sql语句:insertbook(title,price)values(‘jsp’,50)。以下结果正确的是()。A、插入失败,sql语句有错B、插入成功,author列的数据是UNKNOWC、插入成功,author列的数据是NULLD、插入成功,author列的数据是50

考题 现有书目表book,包含字段:price(float);现在查询一条书价最高的书目的详细信息,以下语句正确的是()A、select top 1 * from book order by price ascB、select top 1 * from book order by price descC、select top 1 * from book where price= (select max (price)from book)D、select top 1 * from book where price= max(price)

考题 在SQLServer数据库(排序规则为默认值)中,有一个产品表products,你想按照价格从小到大的顺序显示所有产品的名称(productname)和价格(price),可以实现该功能的T-SQL语句是()A、SELECT productname,price from products order by price ASCB、SELECT productname,price from products order by price DESCC、SELECT productname,price from products order by priceD、SELECT productname and price from products order by price DESC

考题 现有书目表book,包含字段:价格price(float),类别type(char);现在查询各个类别的平均价格、类别名称,以下语句正确的是()。A、select avg(price),type from book group by typeB、select count(price),type from book group by priceC、select avg(price),type from book group by priceD、select count(price),type from book group by type

考题 单选题表book中包含三个字段:title(varchar),author(varchar),price(float)。Author的默认值是’UNKNOW’,执行sql语句:insertbook(title,price)values(‘jsp’,50)。以下结果正确的是()。A 插入失败,sql语句有错B 插入成功,author列的数据是UNKNOWC 插入成功,author列的数据是NULLD 插入成功,author列的数据是50

考题 单选题使用SQL语句将表s中字段price的值大于30的记录删除,正确的命令是(  )。A DELETE FROM s FOR price30B DELETE FROM s WHERE price30C DELETE s FOR price30D DELETE s WHERE price30

考题 多选题BookStore数据库中有图书表Book(BookCode,BookName,Author,PublisherCode,PublishTimePublishTime是datetime类型。将Book表中的所有“外语”类图书的价格降低10%,并将折扣均设为8折。SQL语句:UPDATEBookSET()WhereBookSort=‘外语‘。APrice=Price*0.9,Discount=0.8BPrice=Price*(1-10%),Discount=0.8CPrice=0.9,Discount=0.8DDiscount=0.8,Price=Price*0.9

考题 单选题At the beginning of the day, the prices of stocks X and Y are the same. At the end of the day, the price of stock X has increased by 1/20 of its original price and the price of stock Y has decreased by 1/20 of its original price. The new price of stock X is what fraction of the new price of stock Y?A 2/20B 19/21C 21/19D 18/20E 20/18

考题 多选题在SQLServer数据库(排序规则为默认值)中,有一个产品表products,你想按照价格从小到大的顺序显示所有产品的名称(productname)和价格(price),可以实现该功能的T-SQL语句是()ASELECT productname,price from products order by price ASCBSELECT productname,price from products order by price DESCCSELECT productname,price from products order by priceDSELECT productname and price from products order by price DESC

考题 单选题现有表book,字段:id(int),title(varchar),price(float);其中id字段设为标识,使用insert语句向book表中插入数据,以下语句错误的是()。A insert into book(id,title,price)values(1,’java’,100)B insert into book(title,price)values(’java’,100)C insert into book values(’java’,100)D insert book values(’java’,100)

考题 单选题现有书目表book,包含字段:price(float);现在查询一条书价最高的书目的详细信息,以下语句正确的是()。A select top1*from book order by price ascB select top1*from book order by price descC select top1*from book where priceD select top1*from book where price=max(price)

考题 填空题结构的默认值是通过将所有值类型字段设置为它们的默认值,并将所有的引用类型字段设置为()

考题 单选题现有表book,字段:id(int),title(varchar),price(float);其中id字段设为自增长的标识,使用insert语句向book表中插入数据,以下语句错误的是()。A insertintobook(id,title,price)values(1,’java’,100)B insertintobook(title,price)values(’java’,100)C insertintobookvalues(’java’,100)D insertbookvalues(’java’,100)

考题 问答题What was the percent decrease in the price of MegaTek (MGTK) stock during the market decline of March 1, 2001, to March 1, 2002?  (1) The price of MGTK was $56.20 on March 1, 2001.  (2) The price of the stock on January 1, 2002, was only one-quarter of its price as of March 1, 2001.