
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
216 Views
To return list of databases, the syntax is as follows −select schema_name as anyAliasName from information_schema.schemata;Here is the query to return list of databases in MySQL −mysql> select schema_name as DatabaseName from information_schema.schemata;This will produce the following output −+---------------------------+ | DatabaseName | +---------------------------+ | ... Read More

AmitDiwan
526 Views
For this, you need to use SET command only once. Let us first create a table −mysql> create table DemoTable1909 ( Id int NOT NULL, FirstName varchar(20), LastName varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command ... Read More

AmitDiwan
849 Views
Let us first create a table −mysql> create table DemoTable1908 ( Code text ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1908 values('MySQL(1)Database'); Query OK, 1 row affected (0.00 sec) mysql> insert into DemoTable1908 values('MongoDB 2 ... Read More

AmitDiwan
170 Views
Let us first create a table −mysql> create table DemoTable1907 ( UserId int NOT NULL AUTO_INCREMENT, UserName varchar(20), UserAge int, UserCountryName varchar(20), PRIMARY KEY(UserId) )ENGINE=MyISAM, AUTO_INCREMENT=100; Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert ... Read More

AmitDiwan
463 Views
To change format of dates, use the DATE_FORMAT() function. Let us first create a table −mysql> create table DemoTable1906 ( DueTime datetime ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1906 values(now()); Query OK, 1 row ... Read More

AmitDiwan
380 Views
To fasten the process, you can use INDEX. Let us first create a table −mysql> create table DemoTable1905 ( FirstName varchar(20), LastName varchar(20) , INDEX F_L_Name(FirstName, LastName) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert ... Read More

AmitDiwan
400 Views
To escape backslashes, use PreparedStatement while inserting records. Let us first create a table −mysql> create table DemoTable1904 ( ClientId int, ClientName varchar(20), ClientAge int ); Query OK, 0 rows affected (0.00 sec)The Java code is as follows −import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; public ... Read More

AmitDiwan
281 Views
Let us first create a table −mysql> create table DemoTable1903 ( FirstName varchar(20), LastName varchar(20) , Age int ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1903 values('John', 'Smith', 23); Query OK, 1 row ... Read More

AmitDiwan
100 Views
For text transformation in CSS, use the text-transform property with the following values −text-transform: none|capitalize|uppercase|lowercase|initial|inherit;Example Live Demo div { line-height: 1.9; text-transform: uppercase; } Demo Heading This is demo text. This is another demo text. OutputExampleLet us see another ... Read More

AmitDiwan
368 Views
To strip all spaces out of a string in PHP, the code is as follows−Example Live DemoOutputThis will produce the following output−ThisisateststrinTo remove the whitespaces only, the below code can be used−Example Live DemoOutputThis will produce the following output. The str_replace function replaces the given input string with a specific character or ... Read More