
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
112 Views
For faster querying, you need to use MySQL IN(). Let us first create a table −mysql> create table DemoTable1538 -> ( -> ClientId int, -> ClientName varchar(20) -> ); Query OK, 0 rows affected (0.59 sec)Insert some records in the table using insert command −mysql> insert ... Read More

AmitDiwan
80 Views
For this can use DATE_FORMAT() in MySQL. Let us first create a table −mysql> create table DemoTable -> ( -> PurchaseDate date, -> Amount int -> ); Query OK, 0 rows affected (0.52 sec)Insert some records in the table using insert command −mysql> insert into DemoTable ... Read More

AmitDiwan
314 Views
For this, use BETWEEN keyword. Let us first create a table −mysql> create table DemoTable1537 -> ( -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> StudentName varchar(20) -> ); Query OK, 0 rows affected (0.72 sec)Insert some records in the table using insert command −mysql> ... Read More

AmitDiwan
2K+ Views
Let us first create a table. We have set one of the columns with type TINYINT −mysql> create table DemoTable -> ( -> EmployeeId int, -> isMarried tinyint -> ); Query OK, 0 rows affected (6.84 sec)Insert some records in the table using insert command −mysql> ... Read More

AmitDiwan
2K+ Views
For this, you can use WHERE clause with multiple LIKE. Let us first create a table −mysql> create table DemoTable1536 -> ( -> Sentence text -> ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1536 values('I ... Read More

AmitDiwan
619 Views
To order by the first letter, use ORDER BY CASE statement. Let us first create a table −mysql> create table DemoTable1535 -> ( -> Value varchar(100) -> ); Query OK, 0 rows affected (2.26 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1535 ... Read More

AmitDiwan
854 Views
To implement multiple LIKE clauses, the syntax is as follows −select * from yourTableName where yourColumnName1 LIKE ('%yourValue1%' or yourColumnName2 LIKE '%yourValue2%') or (yourColumnName3 LIKE '%yourValue3');Let us first create a table −mysql> create table DemoTable1534 -> ( -> ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> ClientName ... Read More

AmitDiwan
1K+ Views
To count rows from multiple tables in MySQL, the syntax is as follows −Select (select count(*) from yourTableName1) as anyAliasName1, (select count(*) from yourTableName2) as anyAliasName2 from dual;Let us first create a table −mysql> create table DemoTable1 -> ( -> Id int ... Read More

AmitDiwan
687 Views
For this, use INET_ATON() in MySQL. The INET_ATON() method would allow a user to convert IP Address records to a number and then we can use ORDER BY to order them.Let us first create a table −mysql> create table DemoTable -> ( -> IpAddress varchar(50) -> ); ... Read More

AmitDiwan
214 Views
The MySQL equivalent to sybase ASE command is EXPLAIN keyword. Let us first create a table −mysql> create table DemoTable1531 -> ( -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> StudentName varchar(20) -> ); Query OK, 0 rows affected (2.92 sec) mysql> create index Name_index1 ... Read More