
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
79 Views
You need to use intvalue=1. The statement intvalue=’1’ is internally converted to cast(‘1’ as int) by MySQL.Let us first create a table −mysql> create table DemoTable1566 -> ( -> intvalue int -> ); Query OK, 0 rows affected (0.64 sec)Insert some records in the table using insert ... Read More

AmitDiwan
127 Views
Use the MySQL LIKE operator to match even when punctuation is present. Let us first create a table−mysql> create table DemoTable -> ( -> Comments varchar(20) -> ); Query OK, 0 rows affected (1.10 sec)Insert some records in the table using insert command −mysql> insert into DemoTable ... Read More

AmitDiwan
2K+ Views
For this, you can use STR_TO_DATE(). Let us first create a table −mysql> create table DemoTable1565 -> ( -> ArrivalDatetime varchar(40) -> ); Query OK, 0 rows affected (0.82 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1565 values('10/01/2019 21:29:35'); Query OK, 1 ... Read More

AmitDiwan
2K+ Views
For this, you can use the CASE statement. Let us first create a table−mysql> create table DemoTable -> ( -> Name varchar(20), -> Marks1 int, -> Marks2 int -> ); Query OK, 0 rows affected (0.72 sec)Insert some records in the table using insert command−mysql> ... Read More

AmitDiwan
132 Views
For this, use MySQL FIND_IN_SET(). Let us first create a table −mysql> create table DemoTable1563 -> ( -> StudentId int, -> StudentName varchar(20) -> ); Query OK, 0 rows affected (0.52 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1563 values(1001, 'Chris'); ... Read More

AmitDiwan
840 Views
To sort from max to min value, use ORDER BY length(). Let us first create a table −mysql> create table DemoTable -> ( -> Price varchar(20) -> ); Query OK, 0 rows affected (0.92 sec)Insert some records in the table using insert command −mysql> insert into DemoTable ... Read More

AmitDiwan
446 Views
Do not prefix table name with field name like user_name. Instead, use user or username.If you prefix table name, then there may be a chance of ambiguity, so avoid prefixing table name.Let us first create a table −mysql> create table user -> ( -> username varchar(20), -> ... Read More

AmitDiwan
135 Views
For this, use MySQL MONTH() and YEAR() methods. Let us first create a table −mysql> create table DemoTable1562 -> ( -> VoucherValue int, -> RechargeDate date -> ); Query OK, 0 rows affected (1.40 sec)Insert some records in the table using insert command −mysql> insert into ... Read More

AmitDiwan
180 Views
For this, you can use a sub query along with MIN(). Let us first create a table−mysql> create table DemoTable -> ( -> Name varchar(20), -> Score int -> ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert command −mysql> ... Read More

AmitDiwan
132 Views
For this, you can use GROUP_CONCAT(). Let us first create a table −mysql> create table DemoTable1561 -> ( -> StudentName varchar(20), -> Title text -> ); Query OK, 0 rows affected (0.60 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1561 values('Adam', ... Read More