Mysql Concat() function

Usage 1

SELECT CONCAT("This  ", "is  ", "test ", "concatenation") AS testConcatenation;



Syntax
concat(exp1, exp2, exp3, ..) - exp1 is required

Usage 2

Concat table field and text together

SELECT CONCAT(NAME, " is creted at  ", created_at, " ") AS Address
FROM province;




Enjoy...

Comments

Popular posts from this blog

Laravel Sail on Windows issue - "cmdlet Invoke-WebRequest at command pipeline position 1"

Laravel 10 - Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (Connection: mysql, SQL: alter table `users` add unique `users_email_unique`(`email`))