ALPHA语言主要有GET、PUT、HOLD、UPDATA、DELETE、DROP6条语句,语句的基本格式为:
操作语句 工作空间命名 (表达式):操作条件
(1)查询所有被选修的课程号码
GET W (SC.Cno)
(2)查询所有学生的数据
GET W (Student)
(3)查询信息系(IS)中年龄小于20岁的学生的学号和年龄
GET W (Student.Sno,Student.Sage):Student.Sdept=’IS’^Student.Sage<20
(4)查询计算机科学系(CS)学生的学号、年龄,结果按年龄降序排序。
GET W(Student.Sno,Student.Sage):Student.Sdept=’CS’ DOWN Student.Sage
(5)取出一个信息系学生的学号
GET W(1)(Student.Sno):Student.Sdept=’IS’
(6)查询信息系年纪最大的三个学生的学号及其年龄,结果按年龄降序排序
GET W(3) (Student.Sno,Student.Sage):Student.Sdept=’IS’ DOWN Student.Sage
(7)查询信息系学生的名字
RANGE Student S
GET W(S.Sname):S.Sdept=’IS’