Create Database View (Data Management)

License Level:BasicStandardAdvanced

Summary

Creates a view in a database based on an SQL expression.

Usage

Syntax

CreateDatabaseView_management (input_database, view_name, view_definition)
ParameterExplanationData Type
input_database

The database that contains the tables or feature classes used to construct the view. This database is also where the view will be created.

Workspace
view_name

The name of the view that will be created in the database.

String
view_definition

An SQL statement used to construct the view.

String

Code Sample

CreateDatabaseView example (Python window)

The following Python window script demonstrates how to use the CreateDatabaseView tool in immediate mode.

import arcpy
arcpy.CreateDatabaseView_management("Database Connections/city_data.sde","trees","select objectid, owner, parcel from inventory where type = trees")

Environments

This tool does not use any geoprocessing environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013