Sunday, 2 March 2014

Concatenate two column with another text and insert in third column.

+-----+------+----------+-------------+
| id  | abbr | trans_id | forth_field |
+-----+------+----------+-------------+
| 10  | mm   | mm0010   |             |
+-----+------+----------+-------------+

UPDATE table
SET forth_field = CONCAT(abbr, '00', id)
+-----+------+----------+-------------+
| id  | abbr | trans_id | forth_field |
+-----+------+----------+-------------+
| 10  | mm   | mm0010   | mm0010      |
+-----+------+----------+-------------+

No comments:

How calulation total value for HTML input text?

<script> $j(document).ready(function(){ $j(":text").keyup(function(){ if (isNaN($j(this).val())) { alert(...