I simply want to insert the data to a SQL database table and if there is some data inserted already then I want to update that data. How can I do this using Java. Kindly help me
You could use the EXISTS keyword to check for the existance of rows:
IF EXISTS (SELECT TOP 1 * FROM...) BEGIN UPDATE.... END ELSE BEGIN INSERT... END