
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
753 Views
To list temporary table columns in MySQL, let us first create a temporary table.Here’s an example. We have created a temporary table with some columns that includes the details of a student −mysql> CREATE TEMPORARY TABLE DemoTable745 ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentName varchar(100), ... Read More

AmitDiwan
137 Views
Let’s say we have some columns in the table, one for image path and another for the upvotes. However, the first column is the auto increment Id as shown below −mysql> create table DemoTable( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, ImagePath varchar(100), UpvoteValue int ); Query OK, 0 ... Read More

AmitDiwan
107 Views
Yes, we can replace all the digits of column values to zero except the first digit. Let us first see an example and create a table −mysql> create table DemoTable744 (Number varchar(100)); Query OK, 0 rows affected (0.47 sec)Insert some records in the table using insert command −mysql> insert into ... Read More

AmitDiwan
1K+ Views
To keep only first two characters and delete rest of the characters, use SUBSTRING().Let us first create a table −mysql> create table DemoTable743 (SubjectName varchar(100)); Query OK, 0 rows affected (0.54 sec)Insert some records in the table using insert command −mysql> insert into DemoTable743 values('MySQL'); Query OK, 1 row affected ... Read More

AmitDiwan
221 Views
Let us first create a table −mysql> create table DemoTable742 (Value varchar(100)); Query OK, 0 rows affected (2.91 sec)Insert some records in the table using insert command −mysql> insert into DemoTable742 values('632535MIT'); Query OK, 1 row affected (0.23 sec) mysql> insert into DemoTable742 values('US%UK'); Query OK, 1 row affected (0.13 ... Read More

AmitDiwan
805 Views
Let us first create a table −mysql> create table DemoTable741 (Number int); Query OK, 0 rows affected (0.61 sec)Insert some records in the table using insert command −mysql> insert into DemoTable741 values(70); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable741 values(55); Query OK, 1 row affected (0.14 ... Read More

AmitDiwan
798 Views
Use LIKE to find records with double quotes. Following is the syntax −select *from yourTableName where yourColumnName LIKE '%"%';Let us first create a table −mysql> create table DemoTable740 (Value varchar(100)); Query OK, 0 rows affected (0.49 sec)Insert some records in the table using insert command −mysql> insert into DemoTable740 values("\""); ... Read More

AmitDiwan
248 Views
Let us first create a table −mysql> create table DemoTable739 (Price int); Query OK, 0 rows affected (0.65 sec)Insert some records in the table using insert command −mysql> insert into DemoTable739 values(100); Query OK, 1 row affected (0.15 sec) mysql> insert into DemoTable739 values(50); Query OK, 1 row affected (0.14 ... Read More

AmitDiwan
78 Views
Let us first create a table −mysql> create table DemoTable(EmployeeCode varchar(100)); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('EMPLOYEE:100 John Smith'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable values('EMPLOYEE:16537 Chris Brown'); Query OK, 1 ... Read More

AmitDiwan
517 Views
To find strings containing a-z, A-Z and 0-9, use BINARY REGEXP along with AND operator.Let us first create a table −mysql> create table DemoTable738 (UserId varchar(100)); Query OK, 0 rows affected (0.81 sec)Insert some records in the table using insert command −mysql> insert into DemoTable738 values('John'); Query OK, 1 row ... Read More