在visual foxpro中,如何用命令将方式将学生表的第一条记录与最后一条记录交换位置
展开全部
例如 学生表 table1.dbf (name char(8),year num(2))
CLOSE ALL
SET TALK off
SET SAFETY OFF
SELECT 0
USE table1
GO TOP
COPY TO aa.dbf FOR RECNO()=1
GO bottom
COPY TO bb.dbf FOR RECNO()=RECCOUNT()
SELECT table1
GO TOP
INSERT blank before
GO top
SELECT 3
USE bb
SELECT table1
replace table1.name WITH bb.name,table1.year WITH bb.year
GO top
SKIP
DELETE
PACK
SELECT 3
USE aa
SELECT table1
GO bottom
replace table1.name WITH aa.name,table1.year WITH aa.year
bROWSE
CLOSE ALL
SET TALK off
SET SAFETY OFF
SELECT 0
USE table1
GO TOP
COPY TO aa.dbf FOR RECNO()=1
GO bottom
COPY TO bb.dbf FOR RECNO()=RECCOUNT()
SELECT table1
GO TOP
INSERT blank before
GO top
SELECT 3
USE bb
SELECT table1
replace table1.name WITH bb.name,table1.year WITH bb.year
GO top
SKIP
DELETE
PACK
SELECT 3
USE aa
SELECT table1
GO bottom
replace table1.name WITH aa.name,table1.year WITH aa.year
bROWSE
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询