It is not a good idea. They need a lot of room, a lot of sand (they burrow at an angle), and potentially special sand for whatever species is available. Some are only found in calcareous sand, others only in silicious. Eventually, they will starve to death, and should not be kept in a tank.