Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

insert in mysql

 
nikki sinha
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i want to insert something like this in my row.

name email
aaa 'aaa@xyz.com','aaa@qwe.com'

i have tried this query but it gives an error
insert into table1 values('aaa',(' 'aaa@xyz.com','aaa@qwe.com''));

please suggest a proper query..
 
Vinod Tiwari
Ranch Hand
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The syntax doesn't look correct - if you need to insert symbols that you have in your query then probably you should use escape characters. For syntax refer this link.
 
Campbell Ritchie
Marshal
Posts: 53112
124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And why have you got two pairs of round brackets? I suspect )) at the end isn’t right.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!