Available with Standard or Advanced license.
You can define a database view on tables in your database from the database connection context menu or using the Create Database View geoprocessing tool.
If you include a spatial column in the view definition, the spatial column must use a SQL spatial data type. You cannot include a spatial column that is a binary geometry data type. Views created in an Oracle database that include an ST_Geometry column in the view definition require you to configure the Oracle extproc.
Be aware that no matter which method you use, the view is a database view; even if it is created in an enterprise geodatabase, it is not a geodatabase object until you register it with the geodatabase.
Create a view from a database connection in ArcMap
- Start ArcCatalog or ArcMap.
- Connect to the database in which you want to create a view.
Be sure you connect as a user that has the database permissions required to create views. Check your database management system documentation for information on these permissions.
- Right-click the database connection, point to New, and click View.
The Create New View dialog box appears.
- Type a name for your view in the View Name text box.
The view name cannot contain spaces or nonalphanumeric characters and cannot exceed the maximum characters allowed by the database management system for view names.
- Type the SQL query to define your view in the View Definition text box.
- Click OK to create the view.
Your newly defined view appears in the list of data under the database connection.
To allow other people to access the view, grant privileges on the view.
Use the Create Database View geoprocessing tool
You can run the tool or call it from a Python command prompt or script. The following steps explain how to run the tool from ArcMap.
- Start ArcMap.
- Search for or browse to the Create Database View tool in the General toolset of the Data Management toolbox and open the tool.
- Provide a database connection (.sde) file for the Input Database Connection.
The file must connect as a user that has the database permissions required to create views. Check your database management system documentation for information on these permissions.
- Specify a name for the view in the Output View Name text box.
The view name cannot contain spaces or nonalphanumeric characters and cannot exceed the maximum characters allowed by the database management system for view names.
- Type the SQL query to define your view in the View Definition text box.
- Click OK.