Add two string columns in mysql : MySQL में दो स्ट्रिंग कॉलम जोड़ें

Add two string columns in mysql
Add two string columns (दो स्ट्रिंग कॉलम जोड़ें)-

Two predefined functions in MySQL for concatenate multiple columns (एकाधिक स्तंभों को संयोजित करने के लिए MySQL में दो पूर्वनिर्धारित फ़ंक्शन)–

  1. CONCAT
  2. CONCAT_WS
Student Table –
Student Table Example

1- CONCAT function Example (CONCAT फ़ंक्शन उदाहरण)-

CONCAT( column1, column2, … )

MySQL Query –

SELECT CONCAT( first_name, " ", last_name ) AS fullname FROM student;
// Output => Ashok Singh

2- CONCAT_WS function Example (CONCAT_WS फ़ंक्शन उदाहरण)-

CONCAT_WS( ” “, column1, column2, column3, … )

MySQL Query –

SELECT CONCAT_WS( " ", first_name, middle_name, last_name ) AS fullname FROM student;
// Output => Ashok Kumar Singh

Calculate days between two dates in MySQL with example…

Add two string columns in mysql

Tags: Add two string columns in mysql, how to Add two string columns in mysql query, MySQL CONCAT() Function, MySQL Concatenate two columns, SQL concatenate columns

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *