# Replace 假设有数据表如下 ```sql create table cust( id integer primary key , first_name varchar(256), last_name varchar(256), city varchar(256) ); ``` 下列replace语句中,有错误的是: ## 答案 ```sql replace into cust(id) set first_name = 'Mars', last_name = 'Liu' where id = 6; ``` ## 选项 ### 标准的 replace ```sql REPLACE INTO cust(id, first_name, last_name, city) values(1,'Mars', 'Liu', 'Tian Jin'); ``` ### 合法的插入操作 ```sql REPLACE INTO cust(first_name, last_name, city) values('Mars', 'Liu', 'Tian Jin'); ``` ### 合法的插入操作 ```sql REPLACE INTO cust(first_name, last_name, city) SELECT first_name, last_name, city FROM book; ```