怎样在foxpro里添加一个记录?是什么命令的?pro6.0 其他数据库开 foxpro 关闭数据库

Appends a record to the end of a table that contains the specified field values.

Syntax

INSERT INTO dbf_name [(fname1 [, fname2, ...])]

VALUES (eExpression1 [, eExpression2, ...])

?Or ?

INSERT INTO dbf_name FROM ARRAY ArrayName | FROM MEMVAR

Arguments

INSERT INTO dbf_name Specifies the name of the table to which the new record is appended. dbf_name can include a path and can be a name expression.

If the table you specify isn抰 open, it is opened exclusively in a new work area and the new record is appended to the table. The new work area isn抰 selected; the current work area remains selected.

If the table you specify is open, INSERT appends the new record to the table. If the table is open in a work area other than the current work area, it isn抰 selected after the record is appended; the current work area remains selected.

[(fname1 [, fname2 [, ...]])] Specifies the names of the fields in the new record into which the values are inserted.

VALUES (eExpression1 [, eExpression2 [, ...]]) Specifies the field values inserted into the new record. If you omit the field names, you must specify the field values in the order defined by the table structure. If SET NULL is ON, INSERT - SQL attempts to insert null values into any fields not specified in the VALUES clause.

FROM ARRAY ArrayName Specifies the array whose data is inserted into the new record. The contents of the elements of the array, starting with the first element, are inserted into the corresponding fields of the record. The contents of the first array element are inserted into the first field of the new record; the contents of the second array element are inserted into the second field, and so on.

FROM MEMVAR Specifies that the contents of variables are inserted into fields with the same names as the variables. If a variable doesn
怎样在foxpro里添加一个记录?是什么命令的?pro6.0 其他数据库开 foxpro 关闭数据库

抰 exist with the same name as the field, the field is left empty.

Remarks

The new record contains the data listed in the VALUES clause or contained in the specified array or variables. The record pointer is positioned on the new record.

例子

INSERT - SQL Command Examples

The following example opens the employee table and adds one record.

USE employee

INSERT INTO employee (emp_no, fname, lname, officeno) ;

VALUES (3022, "John", "Smith", 2101)

The following example opens the customer table in the testdata database. The contents of the current record are scattered to variables, and the table抯 structure is copied to a new table named cust2. INSERT - SQL is used to insert a new record in the cust2 table, and BROWSE is issued to display the new record.

CLOSE DATABASES

CLEAR

OPEN DATABASE SYS(2004) + "samplesdatatestdata"

USE Customer && Open customer table

* Scatter current record to memory variables

SCATTER MEMVAR

* Copy structure of current table to example table

COPY STRUCTURE TO cust2

* Insert record from memory variable

INSERT INTO cust2 FROM MEMVAR

SELECT CUST2

BROWSE

* Close and delete example table

USE

DELETE FILE cust2.dbf

  

爱华网本文地址 » http://www.413yy.cn/a/25101013/184415.html

更多阅读

怎么在qq空间添加视频模块? qq空间视频模块

怎么在qq空间添加视频模块?——简介 qq空间数量是惊人的,同样有大量的网友希望能在自己的空间里加上自己喜欢的视频。但是大部分童鞋们还不知道怎么添加,网上的方法很多。参差不齐。我也是一个空间密。没事就倒腾空间,在空间里添加视频

怎样在Word中添加新字体 word添加新字体

当我们想用网络中有的新字体来编辑文档时,常常苦恼于怎样才能把网络中的新字体等用到word中? 有时候这些特别的字体还能让我们的文档看起来更加精美时尚。那么,我们该怎么做呢? 现在就来学习怎么在Word中添加新字体喽!怎样在Word中添加

怎样在贴吧发贴子? 精 贴吧贴子查询

贴吧是一个在线的交流平台,让那些对同一个话题感兴趣的人们聚集在一起,方便地展开交流和互相帮助,是个很好的交流平台。有些新手却不懂怎么使用贴吧发贴,今天我就教教新手级的怎么使用贴吧发贴子。怎样在贴吧发贴子? 精——工具/原料电

怎样使用dulife手环-duilife手环是什么 dulife手环客户端下载

怎样使用dulife手环-duilife手环是什么——简介 dulife梦幻手环是一款全新概念可穿戴产品,即只需要戴上它入睡,该手环就会将佩戴者的梦境以脑电波的形式记录下来,睡醒后脑电波文件通过蓝牙上传云,接下来只待脑电波文件生成视频就可以在

声明:《怎样在foxpro里添加一个记录?是什么命令的?pro6.0 其他数据库开 foxpro 关闭数据库》为网友地平线无际分享!如侵犯到您的合法权益请联系我们删除