Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Returns an empty DataTable for importing data on target table.

DataTable $Database.Empty(query: Query)

Arguments

Query query
Query of empty data table.

Remarks

This method is used to create a empty data table for importing data on target table without querying the database.

Query parameter is used to specify target table and schema.

Example

Get Empty Data Table

Code Block
languagejs
var myTable = $Database.Empty({
    TargetSchema : 'HR',
    TargetTable : 'Groups'
});
myTable.Add({Id : 'A', Name : 'Admin'});
myTable.Add({Id : 'U', Name : 'User'});
myTable.Save();