
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
320 Views
Yes, we can set a single value with IN() in MySQL. Let us first create a table−mysql> create table DemoTable -> ( -> FirstName varchar(20) -> ); Query OK, 0 rows affected (0.65 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Chris'); ... Read More

AmitDiwan
292 Views
Yes, we can change the order of columns. This can be done using ALTER command and AFTER to set the new order of an individual column. Let us first create a table −mysql> create table DemoTable -> ( -> `Student_Key_Age` int, -> `Student_Key_Name` varchar(20), -> `Student_Key_CountryName` ... Read More

AmitDiwan
144 Views
Let us first create a table −mysql> create table DemoTable -> ( -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> StudentName varchar(20), -> StudentMarks int, -> Status varchar(20) -> ); Query OK, 0 rows affected (0.97 sec)Insert some records in the table using ... Read More

AmitDiwan
355 Views
To perform custom sorting in MySQL, use ORDER BY FIELD(). Let us first create a table −mysql> create table DemoTable -> ( -> Id int -> ); Query OK, 0 rows affected (0.82 sec)Insert some records in the table using insert command:mysql> insert into DemoTable values(101); Query ... Read More

AmitDiwan
378 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Id int, -> Name varchar(20) -> ); Query OK, 0 rows affected (0.93 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(101, 'Chris'); Query OK, 1 row affected ... Read More

AmitDiwan
2K+ Views
Let us first create a table −mysql> create table DemoTable -> ( -> EmailAddress varchar(20), -> Score int -> ); Query OK, 0 rows affected (1.05 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Chris@gmail.com', 67); Query OK, 1 row affected ... Read More

AmitDiwan
243 Views
To remove trailing space, use RTRIM() in MySQL. Let us first create a table −mysql> create table DemoTable -> ( -> FirstName varchar(50) -> ); Query OK, 0 rows affected (1.38 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('John '); Query ... Read More

AmitDiwan
463 Views
Let us first create a table −mysql> create table DemoTable -> ( -> Id int, -> Name varchar(20) -> ); Query OK, 0 rows affected (0.60 sec)Insert some records in the table using insert command:Insert some records in the table using insert command: mysql> insert into ... Read More

AmitDiwan
270 Views
To update MySQL table engine, following the below syntax −Syntaxalter table yourTableName ENGINE=InnoDB;Let us first create a table −mysql> create table DemoTable -> ( -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> StudentName varchar(20), -> StudentAge int, -> StudentCountryName varchar(20) -> )ENGINE=MyISAM, AUTO_INCREMENT=101; ... Read More

AmitDiwan
283 Views
For this, use MAX() along with GROUP BY clause. Let us first create a table −mysql> create table DemoTable -> ( -> StudentEmailId varchar(20), -> Marks1 int, -> Marks2 int -> ); Query OK, 0 rows affected (0.90 sec)Insert some records in the table using insert ... Read More