- 02 May 2022
- 1 Minute to read
- Print
- DarkLight
Changing Data Fields
- Updated on 02 May 2022
- 1 Minute to read
- Print
- DarkLight
Overview
A Data Structure represents real or abstract objects through the use of data fields, which are basic units of information that are variables of the represented object. An example is a Data Structure called Person with data fields such as HairColor, ShoeSize, and DateofBirth. The data fields and their data types can be edited after initially creating the Data Structure.
How Data Field Changes Affect SQL Table
Data Field Name Changes
No Data in the Table
If creating a data field such as Age as a String [Text] and changing the name to YearsOld with the same data type, SQL will create a new column for YearsOld.
With Data in the Table
If creating a data field such as Age as a String [Text] and changing the name to YearsOld with the same data type, SQL will create a new column for YearsOld and will populate it with null data.
Data Field Type Changes
Changes made to a data field from one type to another will result in a warning to be displayed about this change causing potential problems and may not be possible for certain Data Structures. The changes will update in the SQL table. However, if changing the type from String [Text] to Date/Time, a compile error will occur and a duplicate table will be made in SQL. The original table will retain the data entered but the duplicate will be populated with null data.