我正在学习MySQL,在我的书中,我正在阅读concat
页,并且在concat_WS
查询中我无法弄清楚',\n'
是什么意思。在这里。
create table if not exists hotels (
name varchar(25) primary key,
street varchar(25),
city varchar(25),
state varchar(25),
zip int);
insert into hotels (name, street, city, state, zip)
values ('Las Vegas Hilton', '3000 Paradise Road',
'Las Vegas', 'Nevada', 89109);
select concat(name, ', ', state) from hotels;
select concat_ws('\n', name, street, city, state, zip) from hotels;