Added SQL assertion for tables with inheritance.