Skip to main content
Admissions guidance, study banks, and career tools โ€” get started on Shalyam

Upsert a Customer

Insert a customer (id 1, name 'Aman', city 'Pune'). If a customer with id 1 already exists update the name and city instead.

Table schema

Customers(id INT PRIMARY KEY, name VARCHAR(50), city VARCHAR(50))

Sample data

Existing row: (1, 'Aman K', 'Delhi')

Discussion

No discussions yet.

Rewards ยท v2.1

Join Shalyam Newsletter

Get exclusive insights with every issue: education, research and innovation news.

One email a week. Unsubscribe any time.