
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
238 Views
To concatenate two strings in PHP, the code is as follows −Example Live DemoOutputThis will produce the following output−1.967 and 1.969 Both the values are equal!ExampleLet us now see another example − Live DemoOutputThis will produce the following output−First Name = Jack Second Name = Sparrow Concatenation = JackSparrow

AmitDiwan
752 Views
To compare float values in PHP, the code is as follows −Example Live DemoOutputThis will produce the following output−2.5 3.5 Both the values aren\'t equalExampleLet us now see another example − Live DemoOutputThis will produce the following example−1.967 1.969 Both the values are equal!

AmitDiwan
2K+ Views
The difference is the precedence when we compare AND with && operator. The precedence of AND operator is lower than the operator = when the evaluation is performed, therefore even if both the operators do the same work, the result is different.ExampleLet us first see an example of the AND ... Read More

AmitDiwan
521 Views
To connect Java to MySQL, the Java code is as follows −import java.sql.Connection; import java.sql.DriverManager; public class LostConnectionURLDemo { public static void main(String[] args){ String JDBCURL="jdbc:mysql://localhost:3306/web?autoReconnect=true"; Connection con=null; try{ con = DriverManager.getConnection(JDBCURL, "root", "123456"); ... Read More

AmitDiwan
223 Views
To sort search results based on substring position, use ORDER BY LOCATE(). Let us first create a table −mysql> create table DemoTable1838 ( Subject varchar(100) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into ... Read More

AmitDiwan
486 Views
Let us first create a table −mysql> create table DemoTable1837 ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentName varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1837(StudentName) values('Chris'); Query ... Read More

AmitDiwan
798 Views
This error occurs when we use TYPE for ENGINE NAME. The error is as follows −mysql> create table DemoTable1836 ( ClientId int NOT NULL AUTO_INCREMENT PRIMARY KEY, ClientName varchar(20) )Type=MyISAM AUTO_INCREMENT=1; ERROR 1064 (42000): You have an error in your SQL syntax; ... Read More

AmitDiwan
208 Views
To fetch random rows in MySQL, use ORDER BY RAND(). Let us first create a table −mysql> create table DemoTable1835 ( ListOfIds varchar(20) ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1835 values('10, ... Read More

AmitDiwan
238 Views
Let us first create a table −mysql> create table DemoTable1833 ( Name varchar(20) ); Query OK, 0 rows affected (0.00 sec)Alter table −Mysql> alter table DemoTable1833 ADD FULLTEXT(Name); Query OK, 0 rows affected, 1 warning (0.00 sec) Records: 0 Duplicates: 0 Warnings: 1Insert some ... Read More

AmitDiwan
2K+ Views
Let us create a table and set a column value with type JSONmysql> create table DemoTable1832 ( ListOfNames JSON ); Query OK, 0 rows affected (0.00 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1832(ListOfNames) values('["Sam", "Mike", "Carol"]'); Query OK, ... Read More