A view is created with the following statement:CREATE VIEW v

题目
单选题
A view is created with the following statement:CREATE VIEW v1 AS SELECT col1, col2, col3 FROM t1 WHERE col4 > 1000 ; When will DB2 access the data from table T1 for view V1?()
A

When view V1 is created

B

Each time the REFRESH VIEW v1 statement is executed

C

Each time an SQL statement is executed against view V1

D

Only the first time an SQL statement is executed against view V1

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Given the following DDL and INSERT statements:CREATE VIEW v1 AS SELECT col1 FROM t1 WHERE col1 > 10; CREATE VIEW v2 AS SELECT col1 FROM v1 WITH CASCADED CHECK OPTION; CREATE VIEW v3 AS SELECT col1 FROM v2 WHERE col1 < 100; INSERT INTO v1 VALUES(5); INSERT INTO v2 VALUES(5); INSERT INTO v3 VALUES(20); INSERT INTO v3 VALUES(100);How many of these INSERT statements will be successful?()

A.0

B.1

C.2

D.3


参考答案:C

第2题:

Which two statements about views are true? ()

  • A、A view can be created as read only.
  • B、A view can be created as a join on two or more tables.
  • C、A view cannot have an ORDER BY clause in the SELECT statement.
  • D、A view cannot be created with a GROUP BY clause in the SELECT statement.
  • E、A view must have aliases defined for the column names in the SELECT statement.

正确答案:A,B

第3题:

You are granted the CREATE VIEW privilege. What does this allow you to do? ()

A. Create a table view.

B. Create a view in any schema.

C. Create a view in your schema.

D. Create a sequence view in any schema.

E. Create a view that is accessible by everyone.

F. Create a view only of it is based on tables that you created.


参考答案:C

第4题:

设有关系模式商品(商品号,商品名称,单价,数量,类别),建立统计每类商品总数量的视图的正确语句是()

  • A、CREATE VIEW v1AS SELECT类别,SUM(数量)FROM商品GROUP BY类别
  • B、CREATE VIEW v1AS SELECT类别,COUNT(数量)FROM商品GROUP BY类别
  • C、CREATE VIEW v1(类别,总数量)AS SELECT类别,SUM(数量)FROM商品GROUP BY类别
  • D、CREATE VIEW v1(类别,总数量)AS SELECT类别,COUNT(数量)FROM商品GROU PBY类别

正确答案:C

第5题:

You are responsible for maintaining a SQL Server 2005 database. Business analysts in the company routinely use a view named v CustomerSales to join the Customers and Sales tables in the database. They use the view to aggregate total sales by customer by month. You need to increase the performance of the view. What should you do?()

  • A、Update the view to use an outer join between the Customers and Sales tables.
  • B、Create a clustered index on the v CustomerSales view.
  • C、Create two separate views that do not contain any joinsone view named Customers for the Customers table and another one named v Sales for the Sales table.
  • D、Create a stored procedure for the business analysts that uses the v CustomerSales view.

正确答案:B

第6题:

You are granted the CREATE VIEW privilege. What does this allow you to do?()

  • A、Create a table view.
  • B、Create a view in any schema.
  • C、Create a view in your schema.
  • D、Create a sequence view in any schema.
  • E、Create a view that is accessible by everyone.
  • F、Create a view only of it is based on tables that you created.

正确答案:C

第7题:

 Derek has created a view in the sales.nsf db. Derek wants the sales value column in the view to be punctuated to display two decimal places . which one of the following should he do?()

  • A、 use the @function @decimal in the column formula in the view 
  • B、 select decimal on the numbers tab in the view properties box 
  • C、 select decimal on the numbers tab in the column properties box
  • D、 use the @function @decimal to format the value in the field on the form that will display in the view 

正确答案:C

第8题:

You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20. Which SQL statement would you use to create the view EMP_VU? ()

A. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department _ id IN (10,20);

B. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;

C. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;

D. CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WITH department_id IN (10,20);

E. CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;


参考答案:C

第9题:

You need to perform certain data manipulation operations through a view called EMP_DEPT_VU, which you previously created. You want to look at the definition of the view (the SELECT statement on which the view was create.) How do you obtain the definition of the view? ()

  • A、Use the DESCRIBE command in the EMP_DEPT VU view.
  • B、Use the DEFINE VIEW command on the EMP_DEPT VU view.
  • C、Use the DESCRIBE VIEW command on the EMP_DEPT VU view.
  • D、Query the USER_VIEWS data dictionary view to search for the EMP_DEPT_VU view.
  • E、Query the USER_SOURCE data dictionary view to search for the EMP_DEPT_VU view.
  • F、Query the USER_OBJECTS data dictionary view to search for the EMP_DEPT_VU view.

正确答案:D

第10题:

A DBA has been asked to create a table which will contain a substantial amount of detailed sales information for each calendar month and maintain it to contain only the last 12 months. Which of the following methods will facilitate the online removal of the oldest month’s data?()

  • A、Create an MQT that selects the oldest month of data with the REFRESH IMMEDIATE option.
  • B、Create 12 separate tables, create a view based on all 12, drop the table with the oldest month's data then drop and re- create the view.
  • C、Create a range partitioned table, partitioned by month, and use the ALTER TABLE statement to detach the oldest month and attach storage for new data.
  • D、Create a single table, extract the data to be retained using UNLOAD with a SELECT statement, drop and re-create the table then load only the data to be retained.

正确答案:C

更多相关问题