Create Table (Data Management)

Summary

Creates an ArcSDE, file, or personal geodatabase table, or an INFO or dBASE table.

Usage

Syntax

CreateTable_management (out_path, out_name, {template}, {config_keyword})
ParameterExplanationData Type
out_path

The ArcSDE, file, or personal geodatabase or workspace in which the output table will be created.

Workspace
out_name

The name of the table to be created.

String
template
[template,...]
(Optional)

A table whose attribute schema is used to define the output table. Fields in the template table(s) will be added to the output table.

Table View
config_keyword
(Optional)

The configuration keyword that determines the storage parameters of the table in an ArcSDE geodatabase.

String

Code Sample

CreateTable Example (Python Window)

The following Python Window script demonstrates how to use the CreateTable function in immediate mode.

import arcpy
from arcpy import env

env.workspace = "C:/data"
arcpy.CreateTable_management("C:/output", "habitatTemperatures.dbf", "vegtable.dbf")
CreateTable Example 2 (Stand-alone Python Script)

The following Python script demonstrates how to use the CreateTable function in a stand-alone script.

# Name: CreateTable_Example2.py
# Description: Create table to store temperature data in gnatcatcher habitat areas
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env

# Set workspace
env.workspace = "C:/data"

# Set local variables
out_path = "C:/output"
out_name = "C:/output/habitatTemperatures.dbf"
template = "vegtable.dbf"
config_keyword = ""

# Execute CreateTable
arcpy.CreateTable_management(out_path, out_name, template, config_keyword)

Environments

Output CONFIG Keyword

ArcSDE data only.

Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes

10/27/2014