J
jayderk
Since this is not supported in SQLCE
"IF NOT EXISTS (SELECT customer_id FROM customer WHERE customer_id = '{0}')
INSERT INTO customer(customer_id,event_id) VALUES('{0}','{1}')
what is the recommended way of inserting new rows in the database with a
focus on efficiency?
a) do a try catch on the INSERT statement, if it fails do an UPDATE?
b) check if customer_id exists before trying to INSERT?
customer_id is a primary key
thanks in advanced.
Jay
"IF NOT EXISTS (SELECT customer_id FROM customer WHERE customer_id = '{0}')
INSERT INTO customer(customer_id,event_id) VALUES('{0}','{1}')
what is the recommended way of inserting new rows in the database with a
focus on efficiency?
a) do a try catch on the INSERT statement, if it fails do an UPDATE?
b) check if customer_id exists before trying to INSERT?
customer_id is a primary key
thanks in advanced.
Jay