
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
101 Views
For this, use INET_ATON() in MySQL. Let’s say our records are in the form of an IP Address. The INET_ATON() method would allow a user to convert IP Address records to the number and then we can use ORDER BY to order them.Let us first create a table −mysql> create ... Read More

AmitDiwan
229 Views
Let us first create a table −mysql> create table DemoTable -> ( -> FirstName varchar(20) -> ); Query OK, 0 rows affected (0.77 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Chris'); Query OK, 1 row affected (0.14 sec) mysql> insert into ... Read More

AmitDiwan
212 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Value int -> ); Query OK, 0 rows affected (3.21 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(20); Query OK, 1 row affected (0.78 sec) mysql> insert into ... Read More

AmitDiwan
558 Views
You can use LIMIT 1 OFFSET 1. Let us first create a table −mysql> create table DemoTable -> ( -> Value int -> ); Query OK, 0 rows affected (0.92 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(1); Query OK, 1 ... Read More

AmitDiwan
710 Views
Let us first create a table −mysql> create table DemoTable -> ( -> EmployeeId int NOT NULL AUTO_INCREMENT PRIMARY KEY , -> EmployeeName varchar(20), -> isMarried tinyint -> ); Query OK, 0 rows affected (0.83 sec)Insert some records in the table using insert command −mysql> ... Read More

AmitDiwan
633 Views
Following is the error and it occurs when you implement ZEROFILL incorrectly−mysql> create table DemoTable -> ( -> StudentCode int(10) NOT NULL ZEROFILL AUTO_INCREMENT PRIMARY KEY -> ); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL ... Read More

AmitDiwan
346 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> DoubleValue varchar(20) -> ); Query OK, 0 rows affected (0.58 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(DoubleValue) values('80.2, 90.5, ... Read More

AmitDiwan
1K+ Views
You can create a custom function to sum a comma-separated string in MySQL. Let us first create a table. Here, we have a varchar column, wherein we will add numbers in the form of strings −mysql> create table DemoTable -> ( -> ListOfValues varchar(50) -> ); Query ... Read More

AmitDiwan
352 Views
For this, you can use INFORMATION_SCHEMA.TABLES and find the table you want to search. Let us first create a table −mysql> create table DemoTable -> ( -> Id int, -> Name varchar(20) -> ); Query OK, 0 rows affected (1.57 sec)Insert some records in the table ... Read More

AmitDiwan
2K+ Views
You can use CONCAT(). Let us first create a table −mysql> create table DemoTable1 -> ( -> FirstName varchar(20) -> ); Query OK, 0 rows affected (0.90 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1 values('Chris'); Query OK, 1 row affected (0.12 ... Read More