Node.js MySQL LCASE() Function Last Updated : 17 Feb, 2021 Comments Improve Suggest changes Like Article Like Report LCASE() function is a built-in function in MySQL that is used to convert all characters of a given string to lowercase. Syntax: LCASE(input_string)Parameters: It takes one parameter as follows: input_string: Input string which is passed as a parameter to convert this string to lowercase.Return Value: It returns a new lowercase 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 LCASE('This iNpUT strinG @!#$%^&*()?') AS lowercase_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 LCASE(name) AS lowercase_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 LCASE() 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 LOCATE() Function LOCATE() Function is a Builtin function in MySQL which is used to get position of first occurrence of a pattern in a text when searched from specific position. Note: It is Not Case Sensitive. Syntax: LOCATE(pattern, text, starting_position) Parameters: LOCATE() function accepts three parameters as m 2 min read Node.js MySQL LPAD() Function LPAD() Function is a Builtin function in MySQL which is used to attach a given string to text from left side till total length is equal to given value. If the given string is small then it is repeated multiple times. Syntax: LPAD(text, total_length, string) Parameters: LPAD() function accepts three 2 min read Node.js MySQL LEFT() Function LEFT() Function is a Builtin function in MySQL which is used to get Prefix of a specific size of Given String. Syntax: LEFT(input_string, size_of_prefix) Parameters: LEFT() function accepts two parameters as mentioned above and described below. input_string: We will get prefix of this input stringsi 2 min read Node.js MySQL LOWER() Function LOWER() Function is a Builtin function in MySQL which is used to convert all characters of given string to lowercase. Syntax: LOWER(input_string) Parameters: LOWER() function accepts a single parameter as mentioned above and described below. input_string: We will convert this string to lowercase Ret 1 min read Node.js MySQL LENGTH() Function LENGTH() Function is a Builtin function in MySQL which is used to get length of given string in bytes. Syntax: LENGTH(input_string) Parameters: LENGTH() function accepts a single parameter as mentioned above and described below. input_string: We will get number of characters of this string Return Va 2 min read Like