saloni15 wrote:
form a query to update the record with new data if record exists else insert it into table. can it be done without using stored procedure..
It totally depends on the uniqueness you define for the records.
If its a simple uniqueness(just a field or so...) then a unique constraint might do for you....
but
If its a complex uniqueness(or an entire row data needs to matchup), it might be good to verify that in Businesslogic(if in code) or a SQL function (if in DB)...
So, without using stored proc, it can be done but would depend on your requirement!