- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Manikanth Mani has Published 48 Articles
Manikanth Mani
1K+ Views
To return a random number between 1 and 200, use the JavaScript's Math.random() and Math.floor() method. Example You can try to run the following code to return a random number in JavaScript. document.write(Math.floor(Math.random() * 200) + 1);
Manikanth Mani
140 Views
The toLocaleString() method returns a string value version of the current number in a format that may vary according to a browser's local settings.ExampleYou can try to run the following code to return a string value version − JavaScript toLocaleString() Method var num = new Number(150.1234); document.write( num.toLocaleString());
Manikanth Mani
117 Views
Use the reduce() method in JavaScript to apply a function simultaneously against two values of the array from left-to-right as to reduce it to a single value.The following are the parameters −callback − Function to execute on each value in the array.initialValue − Object to use as the first argument to the ... Read More
Manikanth Mani
100 Views
JavaScript date toLocaleString() method converts a date to a string, using the operating system's local conventions.The toLocaleString method relies on the underlying operating system in formatting dates. It converts the date to a string using the formatting convention of the operating system where the script is running. For example, in ... Read More
Manikanth Mani
157 Views
It can be done with the help of ALTER EVENT statement too. We need to use the combination of database name and event name along with the RENAME keyword. To illustrate it we are having the following example in which we are moving the event named ‘hello_renamed’ from ‘query’ database ... Read More
Manikanth Mani
136 Views
With the help of the SHOW TRIGGERS statement, we can list all the triggers in a particular database. It can be illustrated with the help of the following example −Examplemysql> Show Triggers\G *************************** 1. row *************************** Trigger: trigger_before_delete_sample Event: DELETE Table: sample Statement: BEGIN ... Read More
Manikanth Mani
134 Views
As we know that REPLACE () function is used to replace the occurrences of a substring with another substring within a string. We can also use the REPLACE function with the UPDATE statement to update the table. Following example will demonstrate it −Examplemysql> Update Student set Father_Name = REPLACE(Father_Name, 'Mr.', ... Read More
Manikanth Mani
101 Views
MySQL INSERT() function performs no insertion if the position of insertion is not within the length of the string. There are certain cases like we pass a negative or 0(zero) value or the value goes beyond the value of a total number of characters in an original string by 2 ... Read More
Manikanth Mani
71 Views
For calculating the sum of only dissimilar values of the column we can use ‘DISTINCT’ keyword along with the name of the column. To understand SUM() function for dissimilar values, consider an ‘employee_tbl’ table, which is having the following records −mysql> SELECT * FROM employee_tbl; +------+------+------------+--------------------+ | id | ... Read More