Insertion



next up previous
Next: Updates Up: Modifying the Database Previous: Deletion

Insertion

  1. To insert data into a relation, we either specify a tuple, or write a query whose result is the set of tuples to be inserted. Attribute values for inserted tuples must be members of the attribute's domain.
  2. Some examples:
    1. To insert a tuple for Smith who has $1200 in account 9372 at the SFU branch.

    2. To provide all loan customers in the SFU branch with a $200 savings account.

      Here, we use a select to specify a set of tuples.

      The SQL standard does not allow the embedded select to reference the relation into which tuples are being inserted.

      The insertion

      might insert an infinite number of tuples.



Page created and maintained by Osmar R. Zaï ane
Last Update: Mon Oct 16 16:41:58 PDT 1995