![]() ![]() So, let’s have a simple example of doing this. If you want to add strings instead of special characters or spaces, you can do that too. > SELECT CONCAT(Color, ‘ ‘, Name, ‘-‘, Gender) AS AnimData, Price, Age FROM data.animals WHERE Gender = ‘M’ Įxample 05: Concatenate More Strings with Column Strings The new column ‘Name’ is generated to store the concatenated string values in it and the result is shown below. We want to associate its strings from two columns “TeachName” and “lastname” without a space between them.Įxecute the SELECT CONCAT command having column names in the brackets separated by a comma. We have a table ‘teacher’ in the database ‘data’. Open the MySQL command-line client shell from the applications, and add your password upon asking.Įxample 01: Concatenate Two Columns Using CONCAT
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |