Long distance relationships

I live in LV and so does my boyfriend , but he recently gave me the news he's moving out of State . We have been together for 2 years and I don't know what to do or say to him . Do you think long distance relationships work out ?