
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
243 Views
Use FIND_IN_SET() for command separated argument. Let us first create a table −mysql> create table DemoTable604 (Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Title varchar(100)); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command −mysql> insert into DemoTable604(Title) values('MySQL'); Query OK, 1 row affected ... Read More

AmitDiwan
159 Views
The CHANGE command in MySQL is used to rename column name. Let us first create a table −mysql> create table DemoTable796 ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, Name varchar(100), StudentAge int ); Query OK, 0 rows affected (0.56 sec)Let us check the description of table −mysql> desc ... Read More

AmitDiwan
2K+ Views
Let us first create a table −mysql> create table DemoTable ( Id int, Name varchar(100) ); Query OK, 0 rows affected (1.40 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(100, 'John'); Query OK, 1 row affected ... Read More

AmitDiwan
650 Views
To calculate the sum of square of first n natural numbers in PHP, the code is as follows −Example Live DemoOutputThe sum of square of first 5 natural numbers is 125A function named ‘sum_of_squares’ is defined that takes the limit up to which square of natural number needs to be found. ... Read More

AmitDiwan
262 Views
To calculate the repeated subtraction of two numbers, the code is as follows −Example Live DemoOutputThe repeated subtraction results in 18A function named ‘repeated_sub’ is defined that checks to see if two values divide each other completely, and if this is true, it divides the numbers and gives the floor value ... Read More

AmitDiwan
1K+ Views
To find the sum of odd numbers within a given range, the code is as follows −Example Live DemoOutputThe sum of odd natural numbers between the numbers 3 and 23 is 141.75A function named ‘odd_num_sum’ is defined that computes the sum of odd numbers within a specific range of numbers. The ... Read More

AmitDiwan
183 Views
To find the sum of first n natural numbers that are divisible by a number ‘x’ or a number ‘y’, the code is as follows −Example Live DemoOutputThe sum of first 11 natural numbers divisible by 2 or 5 is 15A function named ‘sum_of_nums’ is defined that computes three values by ... Read More

AmitDiwan
568 Views
To find the numbers within a given array that are missing, the code is as follows −Example Live DemoOutputThe missing numbers in the array is 1 2 3 4 5A function named ‘missing_nums’ is defined that checks to see if a number is missing from an array of continuous numbers. It ... Read More

AmitDiwan
214 Views
To find the first natural number whose factorial can be divided by a number ‘x’, the code is as follows −Example Live DemoOutputThe first natural number whose factorial can be divided by 16 is 4A function named ‘factorial_num’ computes factorial of a number and checks to see if it is divisible ... Read More

AmitDiwan
347 Views
To find if a number is present in a given sequence of numbers, the code is as follows −Example Live DemoOutputIs the number present in the sequence? Yes, it is present in the sequenceA function named ‘contains_in_sequence’ checks to see if two values are same, and if they are equal, the ... Read More