
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
427 Views
To join tables, use the JOIN concept in MySQL. At first, let us create two tables.Let us create the first table −mysql> CREATE TABLE `demo52` ( −> `id` INT NOT NULL, −> `name` VARCHAR(20) NOT NULL, −> PRIMARY KEY (`id`) −> ); Query OK, 0 rows affected (1.19 sec)Insert some ... Read More

AmitDiwan
78 Views
For this, use ORDER BY CASE WHEN statement.Let us create a table −mysql> create table demo51 −> ( −> id int not null auto_increment primary key, −> name varchar(20) −> ); Query OK, 0 rows affected (1.08 sec)Insert some records into the table with the help of insert command −mysql> ... Read More

AmitDiwan
191 Views
At first, you need to extract the last digit and add the extracted value. And the same goes in till we get the sum of all digits of the year, for example, for the year 2020 −2 + 0 + 2 + 0 = 4The concept is as follows to ... Read More

AmitDiwan
7K+ Views
For this, you can use TIMESTAMP keyword in MySQL.Let us create a table −mysql> create table demo50 −> ( −> id int not null auto_increment primary key, −> start_date timestamp default current_timestamp not null, −> end_date timestamp default current_timestamp not null −> ); Query OK, 0 rows affected (1.35 sec)Insert ... Read More