拼接
eg: select trm_date||' + ' as new_date from <table_name>
截取固定长度
eg: select dtbs::char(8)
本文探讨了SQL中用于字符串处理的两种常见操作:拼接与截取。示例包括使用`||`进行字符串拼接以及利用`::char(8)`截取固定长度的字段值。这些技巧在数据库查询和数据处理中非常实用。
拼接
eg: select trm_date||' + ' as new_date from <table_name>
截取固定长度
eg: select dtbs::char(8)
5681
2388

被折叠的 条评论
为什么被折叠?
&spm=1001.2101.3001.5002&articleId=122305382&d=1&t=3&u=3361d17cc27e4410b3e551f36e872321)