---
sourceDocument: Yokohama ServiceNow AI Platform Administration
sourceDocumentLink: https://www.servicenow.com/docs/r/yokohama/platform-administration

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Joining tables

# Joining tables using database views {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

Join tables into a single view and then create a report based on that 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://www.servicenow.com/docs/80wZ~7aF9_RUmy_h9CDTUA)  
   Create the database view.
2. [Add a table to the database view](https://www.servicenow.com/docs/ZzQiBehw2YlfXqEreSkAEg)  
   Specify the table to join to the database view.
3. [Example left join in creating a database view](https://www.servicenow.com/docs/kUmnPpHLOUx6joH5TGhrHw)  
   This example shows the proper settings when using left-joins to add tables to a database view.
4. [Specify a field to return](https://www.servicenow.com/docs/MhOBxVPY7y9dnX31n1t6Ew)  
   Restrict or specify a field that you want returned by the joined table.
5. [Relabel a column](https://www.servicenow.com/docs/xzfpLVTQYFLat_~hl~8eKw)  
   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. [Configuring the number of records to return](https://www.servicenow.com/docs/gWwnhSW65_SP_3ytwK8XUw)  
   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://www.servicenow.com/docs/HUtHLx~~GdHT7BHWTDDKMQ)  
   Verify that the database view works correctly.

**Related concepts**   

* [Displaying function results in a database view](https://www.servicenow.com/docs/6~pBj17T4YmBjfnzbNW8Nw "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://www.servicenow.com/docs/0AvxQicNlBo8dONFQArJZw "ServiceNow performs conjunction (AND) statements before disjunction (OR) statements in a query.")  
**Related reference**   

* [Database views in the base system](https://www.servicenow.com/docs/44_A5sym8IyZRiZ7NvcwDw "Certain views are included in the base system with the Database Views and Database Views for Service Management plugins.")

