
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
164 Views
The HTML Location assign() method loads a new HTML document without replacing the URL of the current HTML document from the document history.SyntaxFollowing is the syntax −location.assign(URL)Let us see an example of HTML Location assign() Method−Example Live Demo body { color: #000; ... Read More

AmitDiwan
247 Views
Let’s say we have a database “web” and we need to get all the tables having a specific column ’StudentFirstName’.For this, below is the query −mysql> select myColumnName.table_name from information_schema.columns myColumnName where myColumnName.column_name = 'StudentFirstName' and table_schema='web';This will produce the following output −+---------------+ | TABLE_NAME | +---------------+ ... Read More

AmitDiwan
1K+ Views
To convert MySQL timestamp to UNIX Timestamp, use the UNIX_TIMESTAMP(). Following is the syntax −select unix_timestamp(yourColumnName) from yourTableName;Let us first create a table −mysql> create table DemoTable( Duetimestamp timestamp ); Query OK, 0 rows affected (2.66 sec)Insert some records in the table using insert command −mysql> insert into DemoTable ... Read More

AmitDiwan
747 Views
To replace & with an ampersand, use MySQL REPLACE(). Let us first create a table −mysql> create table DemoTable( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, Value varchar(100) ); Query OK, 0 rows affected (1.06 sec)Insert some records in the table using insert command −mysql> insert into DemoTable(Value) ... Read More

AmitDiwan
91 Views
Let us first create a table −mysql> create table DemoTable( Value int, Value2 varchar(100) ); Query OK, 0 rows affected (0.84 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(10, '999.999.999.999'); Query OK, 1 row affected (0.18 sec) mysql> insert into DemoTable values(20, ... Read More

AmitDiwan
353 Views
Yes, we can do that. Let us first create a table −mysql> create table DemoTable( Id int ); Query OK, 0 rows affected (1.02 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values(201); Query OK, 1 row affected (0.22 sec) mysql> insert into DemoTable ... Read More

AmitDiwan
2K+ Views
The @@identity returns the last inserted value in the auto_increment column in the current session. Let us first create a table −mysql> create table DemoTable( UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, UserName varchar(100) ); Query OK, 0 rows affected (0.67 sec)Insert some records in the table using ... Read More

AmitDiwan
194 Views
Let us first create a table −mysql> create table DemoTable( ProductName varchar(100), ProductPrice int ); Query OK, 0 rows affected (0.68 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Product-1', 56); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable values('Product-2', ... Read More

AmitDiwan
451 Views
If you will extend the size of a varchar field in MySQL then it won’t affect the data inside it.Let us first create a table −mysql> create table DemoTable( Name varchar(8) ); Query OK, 0 rows affected (1.11 sec)Insert some records in the table using insert command −mysql> insert ... Read More

AmitDiwan
104 Views
Let us first create a table −mysql> create table DemoTable( FirstName varchar(100) ); Query OK, 0 rows affected (0.97 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Chris'); Query OK, 1 row affected (0.31 sec) mysql> insert into DemoTable values('Adam'); Query OK, 1 row ... Read More