$Database.Empty

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

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

Copyright © 2010 - 2023 Emakin. All rights reserved.