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 10740 Articles
AmitDiwan
334 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
177 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
387 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
399 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
263 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
509 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
295 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
307 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
AmitDiwan
234 Views
For this, use GROUP BY clause along with MAX(). Let us first create a table −mysql> create table DemoTable -> ( -> CountryName varchar(20), -> Population int -> ); Query OK, 0 rows affected (0.56 sec)Insert some records in the table using insert command −mysql> insert ... Read More