
- Forum
- Programming Talk
- Java
- primary key
primary key
This is a discussion on primary key within the Java forums, part of the Programming Talk category; I add all data into database from csv file and just insert primary key which are auto generated and not ...
-
primary key
I add all data into database from csv file and just insert primary key which are auto generated and not in the csv file.how i will add primary key into table.
Help me
Thanks in advance
-
you will need to load the csv to temp table, then load to the main table with identity assuing you are using sql server . if you are using oracle, then you need to create a sequence for this
another option is add a colimn in csv, put the sequence numbers before the load for the primary key
-
For add a primary key in a table, add the auto increment keyword to the integer primary key declaration
-
04-18-2010, 02:24 PM #4
- Join Date
- Apr 2010
- Answers
- 4
The primary key of a relational table uniquely identifies each record in the table. It can either be a normal attribute that is guaranteed
-
05-10-2010, 08:52 AM #5
- Join Date
- May 2010
- Answers
- 2
alter table tablename add(constraint constraintname)
ex alter table sai add(colname primarykey);
-
Sponsored Ads

Reply With Quote





