-
Notifications
You must be signed in to change notification settings - Fork 0
/
TableEmployee.al
85 lines (69 loc) · 1.74 KB
/
TableEmployee.al
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
table 50100 Employee
{
Caption = 'employee table';
Description = 'this is the description of the employee table';
DataClassification = ToBeClassified;
fields
{
field(1; "emp code"; Code[10])
{
DataClassification = ToBeClassified;
}
field(2; "emp name"; Text[15])
{
DataClassification = ToBeClassified;
}
field(6; gender; Option)
{
OptionMembers = F,M,T,Nonbinairy,"Do not want to mention";
DataClassification = ToBeClassified;
}
field(3; salary; Decimal)
{
DataClassification = ToBeClassified;
}
field(4; "date of joining"; Date)
{
DataClassification = ToBeClassified;
}
field(5; "city"; Option)
{
OptionMembers = Tunis,Sfax,Mahdia,Mednin;
DataClassification = ToBeClassified;
}
}
keys
{
//this is the primary key, you can add more than 1
key(Key1; "emp code")
{
//there are two types of indexing one is cluster and the other is non cluster
//the index cluster is based on the physical order of the table
Clustered = true;
}
//here you can add the secondary keys
//clusters can be used only once
key(Secky; city)
{
}
}
var
value1: Integer;
value2: Integer;
trigger OnInsert()
begin
Message('Data inserted');
end;
trigger OnModify()
begin
Message('Data modified');
end;
trigger OnDelete()
begin
Message('Data deleted');
end;
trigger OnRename()
begin
Message('Data renamed');
end;
}