【发布时间】:2010-08-28 13:30:20
【问题描述】:
我有一个包含许多 url 的大型数据库,有许多重复的域,我试图只获取域。 例如:
http://example.com/someurl.html
http://example.com/someurl_on_the_same_domain.html
http://example.net/myurl.php
http://example.org/anotherurl.php
我只想获取域,例如:
http://example.com
http://example.net
http://example.org
我的查询是:
从
table组中选择id、siteBYsiteORDER BYidDESC LIMIT 50
我认为我需要使用正则表达式,但我不是 mysql 大师。
【问题讨论】: