
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
90 Views
You need to use GROUP BY clause. Let us first create a −mysql> create table DemoTable1443 -> ( -> StudentId int, -> StudentScore int -> ); Query OK, 0 rows affected (0.42 sec)Insert some records in the table using insert −mysql> insert into DemoTable1443 values(100, 78); ... Read More

AmitDiwan
271 Views
Let us first create a −mysql> create table DemoTable1442 -> ( -> DueTime time -> ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert −mysql> insert into DemoTable1442 values('00:08:00'); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable1442 values('00:04:00'); ... Read More

AmitDiwan
80 Views
MySQL will implicitly convert the column into a number. Following is the syntax −select * from yourTableName order by yourColumnName*1;Let us first create a −mysql> create table DemoTable1441 -> ( -> Id varchar(30) -> ); Query OK, 0 rows affected (0.53 sec)Insert some records in the table ... Read More

AmitDiwan
5K+ Views
Use DEFAULT keyword in MySQL to set default value to NULL. Let us first create a −mysql> create table DemoTable1440 -> ( -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> StudentName varchar(20) DEFAULT NULL, -> StudentAge int DEFAULT NULL -> ); Query OK, 0 ... Read More

AmitDiwan
294 Views
For specific value, use FIND_IN_SET(). Let us first create a −mysql> create table DemoTable1439 -> ( -> CountryId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> CountryCode varchar(20) -> ); Query OK, 0 rows affected (0.49 sec)Insert some records in the table using insert −mysql> insert into ... Read More

AmitDiwan
3K+ Views
For this, you can use JSON data type from MySQL. Let us first create a −mysql> create table DemoTable1438 -> ( -> EmployeeDetails json -> ); Query OK, 0 rows affected (5.97 sec)Insert some records in the table using insert −mysql> insert into DemoTable1438 values('[{"EmployeeId":"EMP-101", "EmployeeName":"Chris"}, {"EmployeeId":"EMP-102", ... Read More

AmitDiwan
214 Views
For index, you can use KEY(). Let us first create a −mysql> create table DemoTable1437 -> ( -> StudentId int, -> StudentName varchar(20), -> StudentMarks int, -> StudentAge int -> , -> KEY(StudentId, StudentMarks, StudentAge) -> ); Query OK, 0 rows affected ... Read More

AmitDiwan
278 Views
Let us first create a −mysql> create table DemoTable1436 -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Name varchar(20) -> ); Query OK, 0 rows affected (1.06 sec)Insert some records in the table using insert −mysql> insert into DemoTable1436(Name) values('Chris'); Query OK, 1 ... Read More

AmitDiwan
1K+ Views
Let us first see the syntax, wherein we are calling multiple procedures from a stored procedure −DELIMITER // CREATE PROCEDURE yourProcedureName() BEGIN CALL yourStoredProcedureName1(); CALL yourStoredProcedureName2(); . . N END // DELIMITER //Let us implement the above syntax to call multiple stored procedures.Following is the ... Read More

AmitDiwan
102 Views
To display dates like “01 August 2019”, use ORDER BY STR_TO_DATE(). Let us first create a −mysql> create table DemoTable1435 -> ( -> DueDate varchar(60) -> ); Query OK, 0 rows affected (1.08 sec)Insert some records in the table using insert −mysql> insert into DemoTable1435 values('01 August ... Read More