In this post will describe on how to create a table (file) using IBM Access Client solutions.
Definition of keywords:
| Schema Name | Schema is the library name of where you will be storing the file |
| Table Name | The name of the table (file) |
| Column Name | The name of the columns (fields) contained within the table (file) |
| Not Null | Ensures column (field) must have a value |
| Default | Sets a default value for the column (field) |
| Primary Key | defines unique row (record) identifier |
| Foreign Key | references a column (field) in another table (file) |
Create Statement syntax
CREATE TABLE schema_name.table_name (
column1 INT PRIMARY KEY,
column2 VARCHAR(50),
column3 VARCHAR(30),
);
Create Statement example:
CREATE TABLE mylibrary.employee (
id INT PRIMARY KEY,
name VARCHAR(50),
department VARCHAR(30),
);
In our example above:
Schema_name = mylibrary
Table_name = employee
Column1 (Field1) ID and this defined as Integer and is the key to the table (file).
Column2 (Field2) NAME, this name can be 50 alphanumeric
Column3 (Field3) DEPARTMENT, the department can be 30 alphanumeric.
Leave a Reply