Node.js MySQL UCASE() Function Last Updated : 07 Oct, 2021 Comments Improve Suggest changes Like Article Like Report UCASE() function is a builtin function in MySQL that is used to convert all characters of a given string to uppercase. Syntax: UCASE(input_string)Parameters: It takes one parameter as follows: input_string: It is the string that is passed for converting this string to uppercase.Return Value: It returns a new uppercase string. Module Installation: Install the mysql module using the following command: npm install mysqlDatabase: Our SQL publishers table preview with sample data is shown below: Example 1: index.js const mysql = require("mysql"); let db_con = mysql.createConnection({ host: "localhost", user: "root", password: '', database: 'gfg_db' }); db_con.connect((err) => { if (err) { console.log("Database Connection Failed !!!", err); return; } console.log("We are connected to gfg_db database"); // Here is the query let query = "SELECT UCASE('This iNpUT strinG @!#$%^&*()?') AS uppercase_name"; db_con.query(query, (err, rows) => { if(err) throw err; console.log(rows); }); }); Run the index.js file using the following command: node index.jsOutput: Example 2: index.js const mysql = require("mysql"); let db_con = mysql.createConnection({ host: "localhost", user: "root", password: '', database: 'gfg_db' }); db_con.connect((err) => { if (err) { console.log("Database Connection Failed !!!", err); return; } console.log("We are connected to gfg_db database"); // Here is the query let query = "SELECT name, UCASE(name) AS uppercase_name FROM publishers"; db_con.query(query, (err, rows) => { if(err) throw err; console.log(rows); }); }); Run the index.js file using the following command: node index.jsOutput: Comment More infoAdvertise with us Next Article Node.js MySQL UCASE() Function P pratikraut0000 Follow Improve Article Tags : Technical Scripter Web Technologies Node.js Technical Scripter 2020 NodeJS-MySQL +1 More Similar Reads Node.js MySQL SUM() Function We use the SUM() function in MySQL to get Sum of the value of some columns. Syntax: SUM(column_name) Parameters: SUM() function accepts a single parameter as mentioned above and described below. column_name: Columnâs name from which we have to return the max value. Module Installation: Install the m 2 min read Node.js MySQL UPPER() Function UPPER() function is a built-in function in MySQL that is used to convert all characters of a given string to uppercase. Syntax: UPPER(input_string)Parameters: It takes one parameter as follows: input_string: It is the given string that is passed for conversion to uppercase.Return Value: It returns a 2 min read Node.js MySQL TRIM() Function TRIM() function is a built-in function in MySQL that is used to trim all spaces from both sides of the input string. Syntax: TRIM(string)Parameters: It takes one parameter as follows: string: It is the string to be trimmed from both sides.Return Value: It returns string after trimming from both side 2 min read Node.js MySQL SUBSTRING() Function SUBSTRING() function is a built-in function in MySQL that is used to get a substring of input string between given range inclusive. Syntax: SUBSTRING(input_string, from, length)Parameters: It takes three parameters as follows: input_string: It is the given string for which the substring will be exec 2 min read Node.js MySQL FIND_IN_SET() Function FIND_IN_SET() function is a built-in function in MySQL that is used to get the position of the first occurrence of value string in a list of strings separated by comma(','). Syntax: FIND_IN_SET(value, list_of_string)Parameters: It takes two parameters as follows: value: It is the value to be searche 2 min read Like