#1 error when selecting tuples failing a predicate

Q: write a SELECT to
– show those … (ie tuples) which are not …
– show students who are not ….
– show accounts which do not …
– show ships which are not ….
– show shops which are not ….

All of these are similar. Usually you need a condition like

  where col8 …
  where col8 not like “%..”

Do you remember a common mistake you tend to make, assuming no nulls?

A: You are assuming each student is represented by just 1 row. Example: an enrollment table with columns for student_id and subject_code. One student can show up in many rows.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s