OCP question analysis _ 007: unique constraints and Indexes

Source: Internet
Author: User

When creating a unique constraint, the OCP will forcibly create or reuse the index www.2cto.com (if no index exists in the previous column, the created index is a unique index. In this case, the index name and the constraint name are the same, and the index cannot be deleted. When unique constraint is deleted, unique index is cascaded. ② If an index already exists in the column, the previous index will be reused without changing the index type. When we delete the constraint, the associated indexes are not cascaded. However, MOS provides a method to add drop index when deleting the constraint, so that you can get it done at once: www.2cto.com alter table table_name drop constraint constraint_name drop index; OCP questions: [SQL] Q: 6 Examine the SQL statem Ent that creates ORDERS table: create table orders (SER_NO number unique, ORDER_ID NUMBER, ORDER_DATE date not null, STATUS VARCHAR2 (10) CHECK (status IN ('credentials ', 'cash '), PROD_ID number references products (PRODUCT_ID), ORD_TOTAL NUMBER, primary key (order_id, order_date )); for which columns wowould an index be automatically created when you execute the above SQL statement? (Choose two.) A. SER_NO B. ORDER_ID C. STATUS D. PROD_ID E. ORD_TOTAL F. composite index on ORDER_ID and ORDER_DATE Answer: A, F

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.