---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Database view creation

# Database view creation {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Create a database view to join tables. You can then create a report based on the
database view.

Use the Database Views module to create a database view that joins
tables to create a pseudo-table that combines data from each table in the view. You can create a
report on this data by adding the database view as a table in a report. Accessing the database
view does not require database access.
1. [Create a database view](https://servicenow-prod.fluidtopics.net/DNFmS3WCRU4~dMwNWg5yNA)  
   Create the database view.
2. [Add a table to the database view](https://servicenow-prod.fluidtopics.net/srLgQBtMP7b2d_6ye9HOLA)  
   Specify the table to join to the database view.
3. [Example left join in creating a database view](https://servicenow-prod.fluidtopics.net/YbZv9kTWXcoSHHIKC4BR_g)  
   This example shows the proper settings when using left-joins to add tables to a database view.
4. [Specify a field to return](https://servicenow-prod.fluidtopics.net/0oQFvR9AKm3ZIiJ1ChYzVA)  
   Restrict or specify a field that you want returned by the joined table.
5. [Relabel a column](https://servicenow-prod.fluidtopics.net/8d7a0j1Ca6RqaLQc8RnEDQ)  
   Sometimes, two different tables may have fields of the same name that are both important (such as two tables with a sys_updated_on field). For clarity, relabel one of the fields.
6. [Specify the number of records to return](https://servicenow-prod.fluidtopics.net/Kcq8jiZSbSjfiY4w9xkB6g)  
   Specify the number of records to return for a database view when the view is used in a script.
7. [Test the database view](https://servicenow-prod.fluidtopics.net/QXcISYz5mD8tNqHT5caD7w)  
   Verify that the database view works correctly.

**Related concepts**   

* [Displaying function results in a database view](https://servicenow-prod.fluidtopics.net/kTnvPDax3tKT97CkQE7Xig "Enhance the display of a database view by adding a function field to the output to display function results.")
* [Using disjunctions in complex queries](https://servicenow-prod.fluidtopics.net/PKuvXfOJEsfJCBPafaFq3Q "ServiceNow performs conjunction (AND) statements before disjunction (OR) statements in a query.")  
**Related reference**   

* [Database views in the base system](https://servicenow-prod.fluidtopics.net/1m0H~JIy87XpAgjHjRl20w "Certain views are included in the base system with the Database Views and Database Views for Service Management plugins.")

