I need to store lotto numbers in a SQL database. There are 8 separate numbers that make up the lotto number.

EX: 07-12-34-40-59-80-88-89

I first thought to store this data in a single row with columns named lotto1 - lotto8. This makes sense because lotto numbers are always displayed low to high, and users will need to see the stored lotto numbers. Writing a select statement would be trivial.

I also need to see how many of the lotto numbers are winners. To do this I need to search for each winning number in every single column.

EX: If the winning numbers were 01-02-03-04-05-06-07-08, I would need to check every column to see "07" is in my lotto1 column.

Checking for winners would be easier if all lotto numbers were stored in a 1 column, and they had a LottoTicketID to associate the 8 rows of data with 1 ticket. When checking for winners, I don't need to say which specific numbers/positions were matches, just how many matches there were.

SELECT LottoTicketID,Count(LottoTicketID) from LOTTOTABLE
WHERE LottoNumber in (01,02,03,04,05,06,07,08)
GROUP BY LottoTicketID

Storing this way would cause problems because I would need to write 7 joins just to display the numbers.

Can someone suggest a way to store this data so that I can:
1. Quickly displayed the lotto numbers/entires
2. Check for winners