how to extract the last inserted value
SELECT id,name,address,telephoneno,mobileno 
FROM tble_contactlist 
WHERE groupid= (SELECT MAX(id) FROM tbl_Contactgroup)


Try this.. it will give you the data for all the value in contact list for the last inserted value in contactgroup