Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

how can i add one field to my table?

I am using ADO to manipulate my table. i have an input table, then i will output several different tables, for the output table, how can i add an auto-increased ID field into my table? THANK YOU VERY MUCH FOR YOUR SUGGESTION :)
0
belinda_sg
Asked:
belinda_sg
1 Solution
 
bistricaCommented:
in table design set property of column to autonumber
0
 
dev_tekCommented:
Its simple just make that column as autonumber and when u insert record use UPDATE query with out inserting any value for that column.
0
 
twalgraveCommented:
Please specify further your requirements.
1) What database
2) Are you using ADO to actually create the table, or to return the data from an already-defined table
3) What are the restrictions on the auto-increased ID field (is it OK to have gaps in the numbers?)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
belinda_sgAuthor Commented:
i use microsoft access to sort my database.
in fact, i am not going to create a table, i am using SQL to select certain records to my new table. so in one form, i use Microsoft Hierarchical FlexGrid Control to show one table, in the new form, i also use the same format, but i wanna add a new field named "S/N" so that i can know that how many records i have for the new table. thank you for you all's help...
0
 
twalgraveCommented:
So you will be doing something like:
Insert into Table2 (select "1" as NewIDCol, col2, col3,col4,col5 from Table1)

Then you can go through and change each column's information after you insert the information in the new database table.
0
 
FaithRavenCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept twalgrave's comment
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

FaithRaven
EE Cleanup Volunteer
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now