Sample/Example needed for a table/field setup

Posted by acctman on Stack Overflow See other posts from Stack Overflow or by acctman
Published on 2010-04-07T19:13:03Z Indexed on 2010/04/07 19:23 UTC
Read the original article Hit count: 270

Filed under:
|
|

Can someone explain the statement below to me with a working sample/example. thanks in advance.

You can not create duplicate fields, but simply add a single extra field, "coupleId", which would have a unique id for each couple; and two rows (one for each person) per couple; then JOIN the table against itself with a constraint like a.coupleId = b.coupleId AND a.id <> b.id so that you can condense the data into a single result row for a given couple.

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql