They won't let you on the plane in the boarding country.
Thailand does not check depending on which country you are flying from. Most countries do check. The airport staff makes sure you have an onward flight before giving you a boarding pass.
The ask:thailand community, consisting of multiple Q/A groups with over 100,000 members, powers this platform. It is not an official government resource. Our members actively contribute to this resource, and while we strive for accuracy, we cannot guarantee its complete reliability. Assistance to travelers is provided as a community service.