
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
1K+ Views
Let us first create a table &mnus;mysql> create table DemoTable ( `timestamp` timestamp ); Query OK, 0 rows affected (1.12 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(now()); Query OK, 1 row affected (0.27 sec) mysql> insert into DemoTable values('00:00:00'); Query OK, 1 ... Read More

AmitDiwan
425 Views
For this, you can use replace() along with group_concat(). Here, for empty fields, we are displaying a comma as a separator. Let us first create a table −mysql> create table DemoTable ( Id int, Number varchar(100) ); Query OK, 0 rows affected (2.03 sec)Insert some records in the ... Read More

AmitDiwan
647 Views
For this, you can use ORDER BY DESC with LIMIT. Let us first create a table −mysql> create table DemoTable ( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserName varchar(100) ); Query OK, 0 rows affected (0.59 sec)Insert some records in the table using insert command −mysql> insert ... Read More

AmitDiwan
330 Views
Let us first create a table −mysql> create table DemoTable ( Name varchar(100) ); Query OK, 0 rows affected (0.60 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('John_Smith'); Query OK, 1 row affected (0.17 sec) mysql> insert into DemoTable values('Chris Brown'); Query OK, ... Read More

AmitDiwan
119 Views
The HTML onresize attribute is triggered when user resize the browser window.SyntaxFollowing is the syntax −Let us see an example of HTML onresize event Attribute −Example Live Demo body { color: #000; height: 100vh; background: linear-gradient(62deg, #FBAB7E 0%, ... Read More

AmitDiwan
282 Views
For this, you can use DISTINCT along with the INSERT INTO SELECT statement. Let us first create a table −mysql> create table DemoTable1 ( Value int ); Query OK, 0 rows affected (1.03 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1 values(50); Query OK, ... Read More

AmitDiwan
237 Views
The HTML onpaste attribute is triggered when user paste some content in an HTML element in an HTML document.SyntaxFollowing is the syntax −Let us see an example of HTML onpaste event Attribute −Example Live Demo body { color: #000; height: 100vh; ... Read More

AmitDiwan
1K+ Views
Let us first create a table −mysql> create table DemoTable ( UserId int, UserMessage varchar(100) ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(1, 'Hi'); Query OK, 1 row affected (0.09 sec) mysql> insert into DemoTable ... Read More

AmitDiwan
1K+ Views
For this, you can use IN() along with ORDER BY FIELD(). Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstName varchar(100) ); Query OK, 0 rows affected (0.64 sec)Insert some records in the table using insert command −mysql> ... Read More

AmitDiwan
554 Views
Use information_schema.tables to display all the tables. With that, se the database name as well, so that you can display tables only from a specific database.Let us now display all the tables in the database “web” −mysql> select group_concat(table_name) from information_schema.tables where table_schema='web';This will produce the following output −+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ... Read More