SQL问题答案 高手帮忙
来源:百度知道 编辑:UC知道 时间:2024/05/11 20:39:20
编写并执行一条SELECT语句,它将以“The title is:title title number title_id”的格式返回title表中title和title_id列的内容。 高手帮忙解决下..
要SELECT语句
要SELECT语句
要看你用的是什么数据库
mysql:concat()
oracle: concat(),||
sql server:+
concat()语法如下:
concat(字符串1,字符串2,....)将字符串1,字符串2,等字符串连接在一起。但是oracle的concat()只允许两个参数;
对于你的问题,
mysql
select concat('the title is:',title,'title number ',title_id) from title
oracle
select 'the title is:'||title||'title number '||title_id from title
sql server
select 'the title is:'+title+'title number'+title_id from title
rs("title")="The title is" + title
rs("title_id")=" title number" + title_id
是用SELECT做啊
select concat('the title is:',title,' title number ',title_id) from title;