UPDATE stock SET (status = NULL; quantity, price = 0) WHERE item LIKE S%
UPDATE stock SET (status, quantity, price) = (NULL, 0, 0) WHERE item LIKE S%
UPDATE stock SET status = NULL, SET quantity = 0, SET price = 0 WHERE item LIKE 'S%'
UPDATE stock SET (status = NULL), (quantity = 0), (price = 0) WHERE item LIKE S%
第1题:
Given the following requirements:Create a table named TESTTAB, which has an identity column named ACTIVITYNO. Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Make the identity column unique. Which of the following CREATE statements will successfully create this table?()
A.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))
B.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTNO))
C.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 1), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))
D.CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))
第2题:
阅读以下说明和 Java 代码,填补代码中的空缺,将解答填入答题纸的对应栏内。 【说明】 在股票交易中,股票代理根据客户发出的股票操作指示进行股票的买卖操作。其类图如图 6-1 所示。相应的Java 代码附后。图6-1 类图
【 Java 代码】 import java.util.ArrayList; import java.util.List; class Stock { private String name; private int quantity; public Stock(String name ,int quantity) { this.name = name; this.quantity = quantity; } public void buy() { System.out.println("[ 买进]: " + name + ",数量. " + quantity);} public void sell() { System.out.println("[ 卖出]: " + name + ",数量. " + quantity);} } interface Order { void execute(); } class BuyStock (1) Order { private Stock stock; public BuyStock(Stock stock) { (2) = stock; } public void execute() { stock.buy();} } //类SellStock实现和BuyStock 类似,略 class Broker { private List<Order> orderList = new ArrayList<Order>(); public void takeOrder( (3) order) { orderList.add(order); } public void placeOrders() { for ( (4) order : orderList) { order.execute(); } orderList.clear(); } } public class StockCommand { public static void main(String[] args) { Stock aStock = new Stock("股票 A" ,10); Stock bStock = new Stock("股票 B" ,20); Order buyStockOrder = new BuyStock(aStock); Order sellStockOrder = new SellStock(bStock ); Broker broker = new Broker(); broker.takeOrder(buyStockOrder); broker.takeOrder(sellStockOrder); broker. (5) ; } }
第3题:
Given the following table definition: STOCK: item VARCHAR(30) status CHAR(1) quantity INT price DEC(7,2) If items are indicated to be out of stock by setting STATUS to NULL and QUANTITY and PRICE to zero, which of the following statements would be used to update the STOCK table to indicate that all the items whose description begins with the letter "S" are out of stock?()
第4题:
An application needs a table for each connection that tracks the ID and Name of all items previously ordered and committed within the connection. The table also needs to be cleaned up and automatically removed each time a connection is ended. Assuming the ITEMS table was created with the following SQL statement: CREATE TABLE items item_no INT, item_name CHAR(5), item_qty INT) Which of the following SQL statements will provide the table definition that meets the specified requirements?()
第5题:
Given the following code: public class Person{ int arr[] = new int[10]; public static void main(String a[]) { System.out.println(arr[1]); } } Which statement is correct?()
第6题:
You are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.) 01 Dim dt As New DataTable("Products") 02 dt.Columns.Add(New DataColumn("Price", _ GetType(Decimal))) 03 dt.Columns.Add(New DataColumn("Quantity", _ GetType(Int32))) 04 Dim dc As DataColumn = New DataColumn("Total", _ GetType(Decimal)) 05 dt.Columns.Add(dc) You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? ()
第7题:
It would be automatically enabled and deferred.
It would be automatically enabled and immediate.
It would remain disabled and has to be enabled manually using the ALTER TABLE command.
It would remain disabled and can be enabled only by dropping the foreign key constraint and re-creating it.
第8题:
CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED ALWAYS AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1), PRIMARY KEY emp_pk (empno), FOREIGN KEY emp_workdept_fk ON (workdept) REFERENCES department (deptno), CHECK edlevel_ck VALUES (edlevel IN ('C','H','N')), );
CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK edlevel VALUES ('C','H','N') );
CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1) CHECK IN ('C','H','N')), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY department (deptno) REFERENCES (workdept) );
CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK (edlevel IN ('C','H','N')) );
第9题:
DROP TABLE
ALTER TABLE
RESIZE
COALESCE
第10题:
Add the following code segment after line 05. dc.ExtendedProperties[Total] = Price * Quantity”;
Add the following code segment after line 05. dc.Expression = “Prince * Quantity”;
Write an event handler for the DataTable's TableNewRow event that updates the row's Total.
Write an event handler for the DataTable's ColumnChanged event that updates the row's Total.
第11题:
CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))
CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTNO))
CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 1), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))
CREATE TABLE TESTTAB (ACTIVITYNO SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 10 INCREMENT BY 10), ACTKWD CHAR(6) NOT NULL, ACTDESC VARCHAR(20) NOT NULL, UNIQUE(ACTIVITYNO))
第12题:
第13题:
阅读以下说明和 C++代码,填补代码中的空缺,将解答填入答题纸的对应栏内。 【说明】 在股票交易中,股票代理根据客户发出的股票操作指示进行股票的买卖操作。其类图如图5-1所示,相应的c++代码附后。图5-1 类图
【C++代码】 include <iostream> include <string> include <vector> using namespace std; class Stock { private: string name; int quantity; public: Stock(string name ,int quantity) { this->name= name;this->quantity = quantity; } void buy() { cout<<" [买进]股票名称: "<< name << ",数量: "<< quantity << endl;} void sell() { cout<<" [卖出]股票名称: " << name << ",数量:"<< quantity <<endl; } }; class Order { public: virtual void execute() = 0; }; classBuyStock: (1) { private: Stock* stock; public: BuyStock(Stock* stock) { (2) = stock; } void execute() { stock->buy () ; } }; //类SellStock的实现与BuyStock类似,此处略 c1ass Broker { private: vector < Order*> orderList; pub1ic: void takeOrder( (3) order) { orderList.push_back(order);} void p1aceOrders() { for (inti=O; i<orderList.size(); i++) { (4) -> execute () ; } orderList.c1ear(); } }; c1ass StockCommand { pub1ic: void main () { Stock* aStock = new Stock("股票 A" ,10); Stock* bStock = new Stock("股票 B" ,20); Order* buyStockOrder = new BuyStock(aStock); Order* se11StockOrder = new Se11Stock(bStock); Broker* broker = new Broker(); broker->takeOrder(buyStockOrder); broker->takeOrder(se11StockOrder); broker-> (5) () ; } }; int main() { StockCommand* stockCommand = new StockCommand(); stockCommand->main(); de1ete stockCommand; }
第14题:
第15题:
A table was created using the following DDL: CREATE TABLE employee (id SMALLINT NOT NULL, name VARCHAR(9), dept SMALLINT CHECK (dept BETWEEN 10 AND 100), job CHAR(10) CHECK (job IN ('Sales','Mgr','Clerk')), hiredate DATE, salary DECIMAL(7,2), comm DECIMAL(7,2), PRIMARY KEY (id), CONSTRAINT yearsal CHECK (YEAR(hiredate) > 2004 OR salary > 80500) ); Which of the following INSERT statements will fail?()
第16题:
Given the following requirements: Create a table to contain employee data, with a unique numeric identifier automatically assigned when a row is added, has an EDLEVEL column that permits only the values 'C', 'H' and 'N', and permits inserts only when a corresponding value for the employee's department exists in the DEPARTMENT table. Which of the following CREATE statements will successfully create this table?()
第17题:
You execute the following PL/SQL:Which two statements are true?()
第18题:
Given the following requirements:Create a table named TESTTAB, which has an identity column named ACTIVITYNO. Define the identity column to generate the values for the column by default. Start the values at 10 and increment by 10. Make the identity column unique. Which of the following CREATE statements will successfully create this table?()
第19题:
displaying the minimum list price for each product status
displaying all supplier IDs whose average list price is more than 500
displaying the number of products whose list prices are more than the average list price
displaying all the products whose minimum list prices are more than the average list price of products having the product status orderable
displaying the total number of products supplied by supplier 102071 and having product status OBSOLETE
第20题:
When compilation some error will occur.
It is correct when compilation but will cause error when running.
The output is zero.
The output is null.
第21题:
2/20
19/21
21/19
18/20
20/18
第22题:
INSERT INTO employee VALUES (2, 'Smith', 80, 'Mgr', '09/03/2006', 80000, NULL)
INSERT INTO employee VALUES (4, 'Smith', 86, 'Mgr', '07/14/2003', 90000, NULL)
INSERT INTO employee VALUES (1, 'Smith', 55, 'Sales', '07/14/2003', NULL, NULL)
INSERT INTO employee VALUES (3, 'Smith', 33, 'Analyst', '11/26/2006', 90000, NULL)
第23题:
DECLARE GLOBAL TEMPORARY TABLE tracker AS (SELECT item_no, item_name FROM items) WITH NO DATA ON COMMIT PRESERVE ROWS ON DISCONNECT DROP TABLE
DECLARE GLOBAL TEMPORARY TABLE tracker AS (SELECT item_no, item_name FROM items) WITH NO DATA ON COMMIT PRESERVE ROWS
CREATE TABLE systmp.tracker AS (SELECT item_num, item_name FROM items) WITH NO DATA ON COMMIT PRESERVE ROWS
CREATE TABLE tracker AS (SELECT item_num, item_name FROM items) ON COMMIT PRESERVE ROWS ON DISCONNECT DROP TABLE