kalo mau sekali jalan, gunakan : TRUNCATE TABLE nama_table. Best regards
~subchan ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Frangky id Sent: Thursday, April 17, 2008 1:53 PM To: programmer-vb Subject: [Programmer-VB] Bagaimana membuat Field dengan tipe data int (Autoincrement) selalu kembali ke angka 1. Hallo Experts. Saya menggunakan database MySQL 5.0. Pada table temporary saya membuat field kodetransaksi, dengan tipe data int. Field tersebut saya mengaktifkan Autoincrement sejenis Autonumber pada MS Access. Misalnya saya menginput 5 record kedalam table tersebut, nanti pada field kodetransaksi, dengan sendirinya akan muncul angka 1,2,3,4,5. Masalahnya adalah, kalau lima record tadi saya hapus, lalu diisi dengan record baru, misalnya 3 record. field kodetransaksi tadi akan tercipta angka 6, 7, 8. Padahal yang saya inginkan angka 1, 2, 3. Bagaimana membuat agar setiap kali data di table temporary dihapus keseluruhan, dan setiap kali data baru diinput, field kodetransaksi selalu menciptakan angka 1. Saya sangat memohon bantuan teman-teman yang expert database dan vb. This email and any attachments are confidential and may also be privileged. If you are not the addressee, do not disclose, copy, circulate or in any other way use or rely on the information contained in this email or any attachments. If received in error, notify the sender immediately and delete this email and any attachments from your system. Emails cannot be guaranteed to be secure or error free as the message and any attachments could be intercepted, corrupted, lost, delayed, incomplete or amended. Standard Chartered PLC and its subsidiaries do not accept liability for damage caused by this email or any attachments and may monitor email traffic. Standard Chartered PLC is incorporated in England with limited liability under company number 966425 and has its registered office at 1 Aldermanbury Square, London, EC2V 7SB. Standard Chartered Bank ("SCB") is incorporated in England with limited liability by Royal Charter 1853, under reference ZC18. The Principal Office of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In the United Kingdom, SCB is authorised and regulated by the Financial Services Authority under FSA register number 114276. If you are receiving this email from SCB outside the UK, please click http://www.standardchartered.com/global/email_disclaimer.html to refer to the information on other jurisdictions.
