I have a table with 30851204 rows and I want to update the value of one of its column and I am looking for an efficient way, like updating the value of entire column with following code. Instead of reading each value and update its value in the table

```
UPDATE table1 SET column1 = 1

```

The column values take this general form:

```
<http://rdf.freebase.com/ns/m.0zzzr2k> 

```

I want to update each such value to be only the last segment pf the URL path, so just `m.0zzzr2k` in the above example. The following Java code computes the desired value, but I do not know how to write an equivalent in MySQL.

```
String str[]= typ.split("<http://rdf.freebase.com/ns");
typ=str[1].substring(0, (str[1].length()-1));

```