先看一張科學家的生卒年月表bash
截取科學家的出生年份能夠很方便的用left函數截取,若是要截取去世年份,須要先獲取字符「—」的位置。函數
select substring(c,charindex('—',c)+1,4) from scientist