LassoScript Utility
Basics Browse Detail

[Database_RemoveField]

Tag Link [Database_RemoveField] Category Database
Type Process Source Available Yes
Support Preferred Version 5.0
Change Unchanged Data Source Lasso MySQL
Output Type None Security Tag
Implementation LDML Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0

Description

[Database_RemoveField] removes a field from an existing MySQL database table. Any data in the specified field will be permanently destroyed.

This tag is certified to work with Lasso MySQL and MySQL data sources. It may also work with third party data sources that support the -SQL command tag.

This tag requires a -Database and a -Table parameters that specify the database and table from which the field should be deleted. The current user must have permission to execute -SQL actions.

The -Field parameter specifies the name of the field to be deleted.

Syntax

[Database_RemoveField:
  -Database='Database Name',
  -Table='Table Name',
  -Field='Field Name']

Parameters

Required Parameters
-Database The name of the field to be removed.
-Table The name of the table from which the field should be removed.
-Field The name of the field to be removed.

Examples

To removea field from a Lasso MySQL table:

Use the [Database_RemoveField] tag. The following code removes a field named CreationDate from the MyPreferences table in the Site database.

All of the data in this field as wll as all the field definition will be removed permanently. There is no way to undo this action.

[Database_RemoveField-Database='Site', 
  -Table='MyPreferences',
  -Field='CreationDate']