We describe an efficient sequential Monte Carlo method for sampling multiway tables with given constraints, which can be used to approximate exact conditional inference on contingency tables. An essential feature of our new method is that it samples table entries sequentially according to an appropriate proposal distribution. The sequential sampling approach "divides and conquers" the difficult task of finding an appropriate proposal distribution for a multiway table with complex constraints. Computational commutative algebra is used to provide conditions that guarantee that our method has certain good properties. We apply our method to a range of examples from social and medical sciences to demonstrate its efficiency in real problems.