Query Schema

Applies to: SharePoint Foundation 2010

The Query schema of Collaborative Application Markup Language (CAML) is used in various ways within the context of Microsoft SharePoint Foundation to define queries against list data. For example, you can assign CAML query strings to the Query property of several classes in the server and client object models in order to return data, or to method parameters of the Lists web service to work remotely with data. CAML queries are also used in the context of CAML views to return specific data. The Query element of the List schema contains elements of the Query schema.

Query Schema Elements

    <Where>

        Logical Joins

        <And>

            [Logical Joins]

            [Comparison Operators]

            <Membership>

        <Or>

            [Logical Joins]

            [Comparison Operators]

            <Membership>

        Comparison Operators

        <BeginsWith>

            <FieldRef>

            <Value>

            <XML>

        <Contains>

            <FieldRef>

            <Value>

            <XML>

        <DateRangesOverlap>

            <FieldRef>

            <Value>

        <Eq>

            <FieldRef>

            <Value>

            <XML>

        <Geq>

            <FieldRef>

            <Value>

            <XML>

        <Gt>

            <FieldRef>

            <Value>

            <XML>

        <In>

            <FieldRef>

            <Values>

               <Value>

            <XML>

        <Includes>

              <FieldRef>

              <Value>

              <XML>

        <IsNotNull>

            <FieldRef>

        <IsNull>

            <FieldRef>

        <Leq>

            <FieldRef>

            <Value>

            <XML>

        <Lt>

            <FieldRef>

            <Value>

            <XML>

        <Membership>

        <Neq>

              <FieldRef>

              <Value>

              <XML>

        <NotIncludes>

              <FieldRef>

              <Value>

              <XML>

    Group/Order Operators

    <GroupBy>

        <FieldRef>

    <OrderBy>

        <FieldRef>

    Value Child Elements

        <ListProperty>

        <Month>

        <Now>

        <Today>

        <UserID>

        <XML>

See Also

Concepts

View Schema

List Schema