view:schema-create( $schema-name as xs:string, $permissions as item()* ) as xs:unsignedLong
This function creates a new relational schema in the Schema database. The schema id is returned. Every SQL deployment must include a default schema, called "main," as shown in the example below.
This schema is typically created for Range Views. However, such a schema can also contain Template Views. Note that Range Views cannot be created in a schema created by a Template View.
xquery version "1.0-ml"; import module namespace view = "http://marklogic.com/xdmp/view" at "/MarkLogic/views.xqy"; view:schema-create("main", ()) (: Create a new schema, named 'main', using the default permissions. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.