Today I stumbled upon a newish MySQL feature that can often be very useful. Since MySQL 4.1 there’s a non-standard feature (i.e. it’s an extension of SQL standard and won’t work on other databases) that lets you insert a new row, but if it happens that a row with same primary/unique key already exists it [...]
Category: Programming, Resources and Links |
3 Comments »
Tags: MySQL, MySQL Insert Row, MySQL Row Update
Every now and then you need to limit the number of rows MySQL returns, i.e. use the LIMIT clause. Result set pagination is by far the most often usage of LIMIT clause, since you usually want to select only rows you’ll be displaying on certain page.
The problem is that for pagination you also need total [...]
Category: Programming |
30 Comments »
Tags: Add new tag, MySQL