DML, Constraints, Assertions, Triggers




CS157a

Chris Pollett

Nov 18, 2019

Outline

Introduction

Database Modifications

INSERTs with a Query

Deletion

Updates

Quiz

Which of the following is true?

  1. In SQL, if two tables share column names, then they cannot be used in the same SQL query.
  2. A subselect in SQL is only allowed as part of a WHERE clause, not a FROM clause.
  3. A HAVING clause in SQL can be used to select which groups are output by a GROUP BY clause.

SQL Data Definition Commands

Specifying Integrity Constraints in SQL

Data Modification and Integrity Constraints

CHECK Constraints

Naming Constraints and Altering Them

Active Databases

Assertions

Triggers