questions about java and database design.

guest (guest)

1) I build a table on my database, the table's structure is people(int ID, string Name, string Address), Now I want to give ID a default value, the value is (表中最后一条记录的ID+1), my purpose is that everytime I insert a new record to the people table, I don't need to specify ID's value, the database system can automatically give me a unique value for ID.

2) If I just want to get the last record in a table(only one record), how to implement this with java.

For the first question, I think it's very easy for a database expert. The second question is not difficult too. But I just don't know, please help.
2001-6-16 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: questions about java and database design.

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论