Posts in Category: snippets

Generate Slug URL in MySQL

A slug is a short name using human-readable keywords to identify a web page. For example, in the following URL

http://www.example.com/schools/play-school

the slug is play-school. This post shows how to automatically generate slug using SQL in MySQL.

Suppose we have a table schools a field name, and we wish to generate a slug for each school using

Read More

WITH RECURSIVE

 

Read More

Switch case (UPDATE)

 

Read More

SELECT Null

 

Read More

ADD new Column – pgSQL

 

Read More

UPDATE from SELECT

 

Read More

INSERT from SELECT

 

Read More