Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax prob

Status
Not open for further replies.

csniffer

Programmer
Apr 30, 2003
161
GB
i want to add information to a table named studentdetails in column named jobchoice1 and it needs to be added on the row where first name is == to Tony, can anyone see whats wrong with my syntax. thx
Code:
mysql> ALTER studentdetails (jobchoice1) VALUES ('Network Administrator') WHERE
firstname == Tony;

To err is human, to completely mess up takes a computer. [morning]
 
First, you need to pick the correct predicate for your query.

"ALTER" changes the actual structure of a table.

"INSERT" adds data to a table.

"UPDATE" edits preexisting data in a table.


You say you want to add data, which would indicate an "INSERT" query. Yet you have a "WHERE" clause in your query. You can't use "WHERE" with "INSERT".

What exactly is it you are trying to do?

Want the best answers? Ask the best questions: TANSTAAFL!!
 
It is update that I need to use, your answer has enabled me to find the answer in a book. Thx T

To err is human, to completely mess up takes a computer. [morning]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top