Suppose the table Jxc_jyz (nyear N (4), Nmonth N (2), CXSBM C (), Nqczc_sl N (12,3), Nbqjh_sl N (12,3), Nbqxs_sl N (12,3), Nqmkc_sl N (12,3), Cjzzt N (2))
If we want to create a temporary table Tjxc_jyz with the same structure as above, the common method is:
CREATE CURSOR Tjxc_jyz (nyear N (4), Nmonth N (2), CXSBM C (), Nqczc_sl N (12,3), Nbqjh_sl N (12,3), Nbqxs_sl N (12,3), Nqmkc_sl N (12,3), Cjzzt N (2))
This method needs to input a lot of content, including table name, field and field properties, for a cumbersome structure of the table will need to enter more content, and the premise is to know the specific structure of the original table. Obviously we will feel very cumbersome, there is no better way? Yes! We can quickly create a temporary table that is exactly the same as the original table structure by using the following methods:
Use Jxc_jyz
Sele Jxc_jyz
=afield (TDBF) && storing the structure of the original table in a predetermined array tdbf
Create cursor Tjxc_jyz from array tdbf && creating temporary tables through an array tdbf Tjxc_jyz
* * Temporary table creation complete
Sele tjxc_jyz && Select the temporary table we created to browse
Brow
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.