| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Bill Abel | Date: | October 10 2005 7:10pm |
| Subject: | How do you set a Primary Key when uploading data into a table? | ||
| View as plain text | |||
How do you load data into a table and generate a primary key which increments by 1. I want to end up with a primary key value of int 1, 2, 3, 4, and so on. My table has three rows, Id, Code, Description. I'm loading data from a text file into the table like this: load data local infile '/Users/billabel/Desktop/sic.txt' into table sic_codes lines terminated by '\r' (code, description); The Id row gets values of 99897, and then increments by one.
| Thread | ||
|---|---|---|
| • How do you set a Primary Key when uploading data into a table? | Bill Abel | 10 Oct |
| • Re: How do you set a Primary Key when uploading data into a table? | Gleb Paharenko | 11 Oct |
