![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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
AmitDiwan has Published 11365 Articles
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
110 Views
Let us first create a table -mysql> create table DemoTable732 ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, PassengerId int, PassengerName varchar(100), PassengerAge int, PassengerTravelDatetime datetime ); Query OK, 0 rows affected (0.67 sec)Insert some ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
2K+ Views
Let us first create a table:mysql> create table DemoTable731 (Value varchar(100)); Query OK, 0 rows affected (0.50 sec)Insert some records in the table using insert command -mysql> insert into DemoTable731 values('4.50'); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable731 values('7.83'); Query OK, 1 row affected (0.18 sec) ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
1K+ Views
For this, use stored procedure. Let us first create a table −mysql> create table DemoTable(Id int, Name varchar(100)); Query OK, 0 rows affected (1.51 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(10, 'John'); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
696 Views
To count days in date range, you need to find the difference between dates using DATEDIFF().Let us first create a table:mysql> create table DemoTable730 ( StartDate date, EndDate date ); Query OK, 0 rows affected (0.45 sec)Insert some records in the table using insert command:mysql> insert into DemoTable730 ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
2K+ Views
For this, use UNION ALL.Let us first create a table:mysql> create table DemoTable729 ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentName varchar(100), MySQLMarks int, CMarks int, JavaMarks int ); Query OK, 0 rows affected (0.40 sec)Insert some records in the table using insert command:mysql> ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
83 Views
To calculate power of a number, use POWER() function. Let us first create a table −mysql> create table DemoTable ( Amount int ); Query OK, 0 rows affected (0.89 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(64); Query OK, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
259 Views
The UK date format supports day-moth-year format. To convert it to MySQL date, use STR_TO_DATE(). Following is the syntax:select str_to_date(yourColumnName, '%d/%m/%Y') from yourTableName;Let us first create a table:mysql> create table DemoTable728 (DueDate varchar(100)); Query OK, 0 rows affected (0.59 sec)Insert some records in the table using insert command:mysql> insert into ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
93 Views
For this, you can use IN().Let us first create a table:mysql> create table DemoTable727 ( Name varchar(100), Score int ); Query OK, 0 rows affected (0.88 sec)Insert some records in the table using insert command:mysql> insert into DemoTable727 values('Chris', 45); Query OK, 1 row affected (0.18 sec) mysql> ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
306 Views
Let us first create a table −mysql> create table DemoTable(DueDate varchar(100)); Query OK, 0 rows affected (0.78 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('10-01-2019 10:19:20'); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable values('12-03-2018 11:00:00'); Query OK, 1 row affected ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
395 Views
Let us first create a table −mysql> create table DemoTable726 (Value varchar(100)); Query OK, 0 rows affected (0.60 sec)Insert some records in the table using insert command −mysql> insert into DemoTable726 values('100'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable726 values('10'); Query OK, 1 row affected (0.15 ... Read More