I would suggest you get a copy of the iphone forensics from o'rielly. it's available on torrent sites. here's some of the info in it:
5.6.8. SMS Messages
The SMS message database contains information about SMS messages sent and received on the device. This includes the phone number of the remote party, timestamp, actual text, and various carrier information. The file can be found on the iPhone's media partition in /mobile/Library/SMS/sms.db:
$ sqlite3 sms.db
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> .headers on
sqlite> select * from message;
ROWID|address|date|text|flags|replace|svc_center|group_id|association_id|
height|UIFlags|version
6|2125551234|1213382708|Wanna go out tonight?|3|0||3|1213382708|38|0|0
Like the call history database, the SMS database also has a flags field, identifying whether the message was sent or received. The value of the low-order bit determines which direction the message was going. Messages that were sent will have this bit set, meaning the flags value will be odd. If the message was received, the bit will be clear, meaning the flags value will be even.
The SMS messages database is also a great candidate for a strings dump, to recover deleted records that haven't been purged from the file. An example follows of an SMS message that had been deleted for several days, but was still found in the SMS database:
$ strings sms.db
12125551234HPs
Hey. Is your iPhone book in any bookstores? Like Barnes & Noble?