SUBQUERY

Subqueries: The Juicy Bits

People love to know where all the juicy stuff is in the bible. So how about we create a table which points in the right direction? Note the use of the SET data type, on one of its rare outings.

DROP TABLE IF EXISTS juicybits;

CREATE TABLE juicybits(
  book        VARCHAR(32),
  cap         TINYINT UNSIGNED,
  verse_start TINYINT UNSIGNED,
  verse_end   TINYINT UNSIGNED,
  title       VARCHAR(255) NOT NULL,
  class       SET('prostitution','virgin',  
                  'insults','rape','slavery',
                  'willy','bear-maul','stoning')
);

Syndicate content