![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
4K+ Views
Let us first create a table −mysql> create table DemoTable ( DueDate date ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('2018-10-01'); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable values('2016-12-31'); Query OK, 1 ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
171 Views
Let us first create a table −mysql> create table DemoTable ( AdmissionDate varchar(100) ); Query OK, 0 rows affected (0.76 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Sunday, 11 August 2019'); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable values('Friday, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
240 Views
Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Value1 int, Value2 int ); Query OK, 0 rows affected (0.55 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(Value1, Value2) values(100, 150); Query OK, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
376 Views
To replace, use REPLACE() function from MySQL. Let us first create a table −mysql> create table DemoTable ( Number varchar(100) ); Query OK, 0 rows affected (0.86 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('+916578675547'); Query OK, 1 row affected (0.17 sec) mysql> ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
86 Views
Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, ClientName varchar(100), ClientAge int ); Query OK, 0 rows affected (0.92 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(ClientName, ClientAge) values('Robert', 45); Query OK, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
524 Views
To fetch the 2nd highest value, use ORDER BY DESC with LIMIT 1, 1. Let us first create a table −mysql> create table DemoTable ( StudentScore int ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(89); Query ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
60 Views
For this, use IS NULL property. Let us first create a table −mysql> create table DemoTable ( EmployeeName varchar(100), EmployeeAge int ); Query OK, 0 rows affected (0.59 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Chris', 32); Query OK, 1 row affected ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
71 Views
We will see an example and create a table wherein we have set StudentId column as AUTO_INCREMENT = 100 and used ZEROFILL as well −mysql> create table DemoTable ( StudentId int(7) ZEROFILL NOT NULL AUTO_INCREMENT, PRIMARY KEY(StudentId) )AUTO_INCREMENT=100; Query OK, 0 rows affected (0.48 sec)Insert some records in ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
74 Views
Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, PlayerName varchar(100), PlayerScore int ); Query OK, 0 rows affected (0.97 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(PlayerName, PlayerScore) values('Chris', 780); Query OK, ... Read More
![AmitDiwan](https://www.tutorialspoint.com/assets/profiles/123055/profile/60_187394-1565938756.jpg)
AmitDiwan
359 Views
To format, use DATE_FORMAT(). Let us first create a tablemysql> create table DemoTable ( LoginTime time ); Query OK, 0 rows affected (0.48 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('13:10'); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable values('20:08'); ... Read More