op:select( $plan as map:map, $columns, as xs:string, [$qualifier as xs:string?] ) as map:map
This call projects the specified columns from the current row set and / or applies a qualifier to the columns in the row set. Unlike SQL, a select call is not required in an Optic query.
xquery version "1.0-ml"; import module namespace op="http://marklogic.com/optic" at "/MarkLogic/optic.xqy"; op:from-view("main", "employees") => op:select(("EmployeeID", "FirstName", "LastName")) => op:order-by("EmployeeID") => op:result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.