• OCP-1Z0-051-V9.02-170题


    170. Which two statements are true regarding the DELETE and TRUNCATE commands? (Choose two.)

    A. DELETE can be used to remove only rows from only one table at a time.

    B. DELETE can be used to remove only rows from multiple tables at a time. 

    C. DELETE can be used only on a table that is a parent of a referential integrity constraint. 父级的参照完整性约束错?

    D. DELETE can be used to remove data from specific columns as well as complete rows. 指定行删除

    E. DELETE and TRUNCATE can be used on a table that is a parent of a referential integrity constraint

    having ON DELETE rule .

    Answer: AE

    答案解析:

    A,DELETE一次只能用于移除一个表的行,正确

    B,DELETE一次只能用于移除多个表的行,错误,一次只能一个表

    C,DELETE只能用于删除有引用完整性约束的父表,错误,有完整性约束的父表不能被删除,除非禁用约束等

    D,DELETE可以用于删除指定列的数据以及完整的行,错误,只能删除行,不能删除列

    E,DELETE和TRUNCATE可以用于有引用完整性约束ON DELETE规则的父表。正确。

    建表时可以使用ON DELETE CASCADE(当删除父表数据时,子表数据也一起删除)或ON DELETE CASCAD SET NULL(当删除父表数据时,子表相关的列设置为NULL)子句,可以在SQL Language Reference里的Constraints部分查找到ON DELETE子句

  • 相关阅读:
    tomcat启动失败日志
    Windows环境卸载tomcat
    JAVA教程_Windows环境Java安装部署教程
    Tomcat和JDK版本的对应关系
    tomcat启动窗口乱码问题_解决办法
    Windows环境Tomcat安装及环境部署_官方教程
    perl + 匹配前导模式一次或者多次
    5.3.5 聚簇索引:
    freshStartTail 第一次启动时 抛弃旧的日志
    tomcat docBase 和 path
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13316832.html
Copyright © 2020-2023  润新知