
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
603 Views
For this, you can use ISNULL in MySQL.Let us create a table −Examplemysql> create table demo86 -> ( -> value1 varchar(20) -> , -> value2 varchar(20) -> ); Query OK, 0 rows affected (2.77Insert some records into the table with the help of insert command ... Read More

AmitDiwan
8K+ Views
To sum rows with same ID, use the GROUP BY HAVING clause.Let us create a table −Examplemysql> create table demo84 -> ( -> id int, -> price int -> ) -> ; Query OK, 0 rows affected (0.60Insert some records into the table with the ... Read More

AmitDiwan
918 Views
For this, use INSERT INTO SELECT statement.Let us create a table −Examplemysql> create table demo82 -> ( -> id int, -> name varchar(20) -> ); Query OK, 0 rows affected (2.06Insert some records into the table with the help of insert command −Examplemysql> insert into demo82 ... Read More

AmitDiwan
4K+ Views
For this, use FIND_IN_SET().Let us create a table −Examplemysql> create table demo81 -> ( -> id int not null auto_increment primary key, -> username varchar(200) -> ); Query OK, 0 rows affected (1.44Insert some records into the table with the help of insert command −Examplemysql> insert ... Read More

AmitDiwan
87 Views
For this, use DATE_FORMAT() in MySQL. The syntax is as follows −Exampleselect date_format(yourColumnName, '%d-%m-%Y') as anyAliasName from yourTableName;Let us create a table −Examplemysql> create table demo80 -> ( -> due_date date -> ); Query OK, 0 rows affected (0.74Insert some records into the table with the help ... Read More

AmitDiwan
4K+ Views
For this, you can use substring_index() in MySQL. Let us create a table −Examplemysql> create table demo79 -> ( -> fullname varchar(50) -> ); Query OK, 0 rows affected (0.64Insert some records into the table with the help of insert command −Examplemysql> insert into demo79 values("John, Smith"); ... Read More

AmitDiwan
3K+ Views
To get username using ID from two tables, you need to use JOIN and join the tables.Let us create a table −Examplemysql> create table demo77 -> ( -> userid int not null primary key, -> username varchar(20) -> ); Query OK, 0 rows affected (2.63Insert some ... Read More

AmitDiwan
560 Views
To find all users with unique last name, use GROUP BY HAVING COUNT().Let us create a table −Examplemysql> create table demo76 -> ( -> firstName varchar(20), -> lastName varchar(20) -> ); Query OK, 0 rows affected (9.29Insert some records into the table with the help of ... Read More

AmitDiwan
876 Views
For this, yYou can use from_unixtime() along with now().Let us create a table with some data type −Examplemysql> create table demo75 -> ( -> due_date int(11) -> ); Query OK, 0 rows affected, 1 warning (2.87Insert some records into the table with the help of insert command ... Read More

AmitDiwan
2K+ Views
To implement LIKE query with dynamic array, the syntax is as follows −Exampleselect *from yourTableName where yourColumnName2 like "%yourValue%" order by yourColumnName1 asc limit yourLimitValue;Let us create a table −Examplemysql> create table demo74 -> ( -> user_id int not null auto_increment primary key, -> ... Read More