--- title: "Specifying the sql:inverse Attribute on sql:relationship (SQLXML 4.0) | Microsoft Docs" ms.custom: "" ms.date: "03/16/2017" ms.prod: "sql-server-2016" ms.reviewer: "" ms.suite: "" ms.technology: - "dbe-xml" ms.tgt_pltfrm: "" ms.topic: "reference" helpviewer_keywords: - "sql:relationship" - "bulk load [SQLXML]" - "inverse attribute" - "relationships [SQLXML], inverse orders" - "relationship annotation" - "XSD schemas [SQLXML], relationships" - "annotated XSD schemas, relationships" - "updategrams [SQLXML], relationships" - "sql:inverse" ms.assetid: 08904cbd-9c86-493d-90c3-f5e1d13ce59d caps.latest.revision: 26 author: "douglaslMS" ms.author: "douglasl" manager: "jhubbard" --- # Specifying the sql:inverse Attribute on sql:relationship (SQLXML 4.0) The **sql:inverse** attribute is useful only when the XSD schema is used for either bulk load or by an updategram. The **sql:inverse** attribute can be specified on the **\** element. In updategrams, the updategram logic interprets the schema in determining the tables and columns that are updated by the updategram operation. The parent-child relationships that are specified in the schema determine the order in which the records are modified (inserted or deleted). If you have an XSD schema in which the parent-child relationship is specified in the inverse order of the primary-key/foreign-key relationship between the corresponding database columns, the insert or delete updategram operation will fail because of the primary-key/foreign-key violation. In such cases, the **sql:inverse** attribute is specified (**sql:inverse="true"**) in the **\** element, and the updategram logic inverses its interpretation of the parent-child relationship specified in the schema. The **sql:inverse** attribute takes a Boolean value (0=false, 1=true). The acceptable values are 0, 1, true, and false. For a working sample using the **sql:inverse** annotation, see [Specifying an Annotated Mapping Schema in an Updategram](../../relational-databases/sqlxml-annotated-xsd-schemas-xpath-queries/updategrams/specifying-an-annotated-mapping-schema-in-an-updategram-sqlxml-4-0.md). ## See Also [Specifying Relationships Using sql:relationship (SQLXML 4.0)](../../relational-databases/sqlxml-annotated-xsd-schemas-using/specifying-relationships-using-sql-relationship-sqlxml-4-0.md)