If you're doing very basic things, the same exact syntax will probably work on multiple. But even then, implementation details like isolation level come into play.
I feel that. Postgres has dump/restore at least, though that's less portable than a unit testing fake. And the thing I use at work lacks a dump/restore feature somehow :/