本文共 1152 字,大约阅读时间需要 3 分钟。
?????????????????????????????????????????????????????????
CONCAT()?????????????????????????CONCAT()????????????
CONCAT(???1, ???2, ...)?+ ???????
MySQL/Oracle?
SELECT CONCAT(region_name, store_name) FROM Geography WHERE store_name = 'Boston';
???EastBoston
Oracle?
SELECT region_name || ' ' || store_name FROM Geography WHERE store_name = 'Boston';
???East Boston
SQL Server?
SELECT region_name + ' ' + store_name FROM Geography WHERE store_name = 'Boston';
???East Boston
SUBSTR()??????????????????????????SUBSTR()????????????
SUBSTR(str, pos) ? SUBSTR(str, pos, len)?SUBSTR(str, pos, len)????
MySQL?
SELECT SUBSTR(store_name, 3) FROM Geography WHERE store_name = 'Los Angeles';
???s Angeles
SQL Server?
SELECT SUBSTR(store_name, 2, 4) FROM Geography WHERE store_name = 'San Diego';
???an D
MINUS???????????????????????
???
SELECT Date FROM Store_Information MINUS SELECT Date FROM Internet_Sales;
???
Jan-05-1999, Jan-08-1999Jan-07-1999?????Jan-05-1999, Jan-08-1999
MINUS??????????????????????????????????
转载地址:http://ptpfk.baihongyu.com/