If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Insert Into Help.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-29-04, 11:48
Hameed Hameed is offline
Registered User
 
Join Date: Nov 2004
Posts: 2
Red face Insert Into Help.

Dear all,
i have a table consists of one column, this column is integer and auto increment.
i need to add a new record unsing SQL statement.

need help plz.
thanks
Reply With Quote
  #2 (permalink)  
Old 11-29-04, 14:29
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
Can you explain the use of such a table? You could probably put the auto increment column on a table where you are actually storing data.

If you NEED to use the table as is you can do

Code:
INSERT into tablename values(NULL)
that will insert a new value into your table.
Reply With Quote
  #3 (permalink)  
Old 11-30-04, 08:04
Hameed Hameed is offline
Registered User
 
Join Date: Nov 2004
Posts: 2
This statment didn't work.
Reply With Quote
  #4 (permalink)  
Old 11-30-04, 09:05
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
What is the table used for, are you sure you haven't misread your homework assignment?
Reply With Quote
  #5 (permalink)  
Old 11-30-04, 13:03
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
What do you mean didn't work. Did a value not get added? Did you replace the name of the table with your table name? Other than that you should type it exactly as i have. if you do that and it still doesn't add a value make sure it is an auto increment table like you think it is.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On