0
I want to link my java application to mysql database..but i want to make new entry in.. Every step..can u help me to slove it
hello friends.i want to link my java application to mysql.to save the data of application.for ex i made a quiz application in which new entries are formed. and i have to store the data of every new entry. keeping the primary key in mind.tell me the primary key.so i can put in database.the primary key should be different in every step.as we know two persons can have same name,same address,or person who play two times will also have same phone no.so how can i decide my primary key.tell me a differnt key
2 odpowiedzi
+ 1
The standard way is to use an auto increment integer for primary keys. when a new record is added, the primary key is automatically incremented by one.
MySQL:
CREATE TABLE table_name (
ID INT PRIMARY KEY AUTO_INCREMENT;
Your other columns.
);
0
thks buddy