I want to store an array in a record.
Table1:
ID, Name, Friends (friends should be an array) 1, Bill, 2&3 2, Charles, 1&3 3, Clare, 1
I want to be able to do a search like this:
SELECT * FROM Table1 WHERE Friends='3'
to find everyone who has Clare listed as a friend
You might want a comma-separated value, but it's not recommended. Why not use another table for showing relationships?
Unless you have a really good reason for doing this, you should keep your data normalized and store the relationships in a different table. I think perhaps what you are looking for is this:
This looks like the perfect place for a relation table instead: Table 1:
Table 2 (the relation table)
The second table keeps track of the friend relations by connecting ID's from Table1.