#创建名为test的表
CREATE TABLE test (
id INT PRIMARY KEY,
username VARCHAR(50)
);
#插入示例数据
INSERT INTO test (id,username) VALUES (1,'test1');
INSERT INTO test (id, username) VALUES (2,'test2');
INSERT INTO test (id, username) VALUES (3,'test3');
#更新字段所有数据加一个字符
UPDATE test SET username = CONCAT(username,'-A') where id = 2;
#查询更新后的数据
SELECT * FROM test where id = 2;
标签: laravel