
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
Ankith Reddy has Published 996 Articles

Ankith Reddy
2K+ Views
You need to use COALESCE() function for this. The syntax is as follows:INSERT INTO yourTableName(yourColumnName1, yourColumnName2) SELECT 1 + COALESCE((SELECT MAX(yourColumnName1) FROM yourTableName WHERE yourColumnName2=’yourValue’), 0), ’yourValue’;To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table InsertMaxPlus1Demo -> ... Read More

Ankith Reddy
5K+ Views
You need to use DISTINCT keyword to select distinct dates from datetime column in a table.For an example, let us create a tablemysql> create table PostMesssageDemo - > ( - > UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY, - > UserMessage varchar(100), - > UserPost datetime ... Read More

Ankith Reddy
605 Views
You can use IF in stored procedure and IF() in select statement as well.IF() in select statementIF() in select statement mysql> select if(0=0, 'Hello MySQL', 'condition is wrong');This will produce the following output −+------------------------------------------------------+ | if('test'='test', 'Hello MySQL', 'condition is wrong') | +------------------------------------------------------+ | Hello MySQL ... Read More

Ankith Reddy
157 Views
The 8085AH activates the RD* Signal at 270 nS. This signal moves to OE* pin of 27128 through the octal line driver 74LS241 delayed by 12nS. Hence the signal OE* signal is received by 27128 at the end of time 282 nS. Hence the data can only come out from ... Read More

Ankith Reddy
1K+ Views
For this, you need to remove the default keyword. The syntax is as follows:ALTER TABLE yourTableName ADD COLUMN yourColumnName dataType NOT NULL AFTER yourColumnName;To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table AddingColumnDefaultValueNOTNULL -> ( -> ... Read More

Ankith Reddy
327 Views
You can use STR_TO_DATE() to convert US date format to MySQL format in INSERT. Let us first create a table −mysql>create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, ShippingDatetime varchar(200) ); Query OK, 0 rows affected (1.04 sec)Insert some records in the table using insert ... Read More

Ankith Reddy
550 Views
We use a logic controller and it is used in industry for the process of control done by the software. Multiple inputs are typically accepted which performs a total complete sequence of operations carried out both arithmetic and logically. The outputs generated are used for the maintenance of the process ... Read More

Ankith Reddy
254 Views
The following is the syntax of END IF statement in MySQLIF yourCondition THEN yourStatement ELSE yourStatement END IFHere is the demo of END IF statement while creating a stored proceduremysql> DELIMITER // mysql> CREATE PROCEDURE Sp_Test( IN value INT ) - ... Read More

Ankith Reddy
2K+ Views
Moreover, we write an assembly program in 8085 assembly language just to simulate a 4-bit ALU by using an interface which is based on the logic controller. The Arithmetic Logical Unit always performs an addition, subtraction, AND operation, or OR operation, which is based on the 4-bit inputs for the ... Read More

Ankith Reddy
90 Views
The remainingCapacity() method of the ArrayBlockingQueue class in Java is used to return the number of additional elements that the queue can adopt without blocking.The syntax is as followsint remainingCapacity()To work with ArrayBlockingQueue class, you need to import the following packageimport java.util.concurrent.ArrayBlockingQueue;The following is an example to implement remainingCapacity() method ... Read More