回答編集履歴
1
追加
answer
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
mysqlとpostgresではpositionは使える様です
|
2
2
|
```sql
|
3
3
|
select substr('hoge@abc.co.jp',1,position('@' in 'hoge@abc.co.jp')-1);
|
4
|
+
|
5
|
+
|
6
|
+
select substr('埼玉県ほげほげ市ほげほげ町',1,position('県' in '埼玉県ほげほげ市ほげほげ町')-1);
|
4
7
|
```
|