This example uses a derived table, a SELECT statement after the FROM clause, to return all authors’ first and last names and the book numbers for each title the author has written.USE pubsSELECT RTRIM(a.au_fname) + ' ' + LTRIM(a.au_lname) AS Name, d1.title_idFROM authors a, (SELECT title_id, au_id FROM titleauthor) AS d1WHERE a.au_id = d1.au_idORDER BY a.au_lname, a.au_fname{摘自《SQL Server Books OnLine》}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货