The format of a generated XML schema for nullstyle=attribute specifies the nillable="true" attribute in each nullable columns declaration. For example:
select forxmlschemaj("select 1,null", "nullstyle=attribute" ----------------------- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sqlxml="http://www.iso-standards.org/mra/9075/sqlx"> <xsd:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.iso-standards.org/mra/9075/sqlx.xsd" /> <xsd:complexType name="RowType.resultset"> <xsd:sequence> <xsd:element name="C1" type="INTEGER" /> <xsd:element name="C2" type="INTEGER" nillable="true"/> </xsd:sequence> </xsd:complexType>< <xsd:complexType name="TableType.resultset"> <xsd:sequence> <xsd:element name="row" type="RowType.resultset" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:simpleType name="INTEGER"> <xsd:restriction base="xsd:integer <xsd:maxInclusive value="2147483647"/> <xsd:minInclusive value="-2147483648"/> </xsd:restriction> </xsd:simpleType> <xsd:element name="resultset" type="TableType.resultset"/> </xsd:schema>