implement SQL sequences