
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
Rishi Rathor has Published 142 Articles

Rishi Rathor
795 Views
The Sum() is an aggregate function in MySQL. You can use sum query with if condition. To understand the sum query with if condition, let us create a table.The query to create a table −mysql> create table SumWithIfCondition −> ( −> ModeOfPayment varchar(100) −> , −> ... Read More

Rishi Rathor
22K+ Views
To select multiple values, you can use where clause with OR and IN operator.The syntax is as follows −Case 1 − Using ORselect *from yourTablename where yourColumnName = value1 or yourColumnName = value2 or yourColumnName = value3, .........N;Case 2 − Using INselect *from yourTableName where yourColumnName IN(value1, value2, ....N);To understand ... Read More

Rishi Rathor
964 Views
To force MySQL LIKE to be case sensitive with the help of LIKE BINARY, the following is the syntax −select yourColumnName like binary 'anyStringValue' from yourTableName;To understand the above concept, let us create a table. The following is the query to create a table −mysql> create table LikeBinaryDemo −> ... Read More

Rishi Rathor
2K+ Views
Use the STR_TO_DATE() function from MySQL to set a date format for displaying DD/MM/YYYY date. The syntax is as follows −SELECT STR_TO_DATE(yourColumnName, ’%d/%m/%Y) as anyVariableName from yourTableName.To understand the above syntax, let us create a table −mysql> create table DateFormatDemo −> ( −> IssueDate varchar(100) ... Read More

Rishi Rathor
529 Views
To cast DATETIME as a DATE in MySQL, use the CAST() function. The syntax is as follows −select cast(yourColumnName as Date) as anyVariableName from yourTableName;To understand the above syntax, let us first create a table −mysql> create table ConvertDatetimeToDate −> ( −> YourDatetime datetime −> ); Query OK, 0 ... Read More

Rishi Rathor
15K+ Views
To delete all the records from a table in MySQL, use the TRUNCATE command. Let us fir see the syntax −TRUNCATE TABLE yourTableName.The above syntax will delete all the records from a table. Let us create a table to understand the above syntax −mysql> create table TruncateTableDemo −> ( ... Read More

Rishi Rathor
515 Views
To get the random integer range, use the rand() function. The query to create a table −mysql> create table RandomIntegerDemo −> ( −> Number int −> ); Query OK, 0 rows affected (0.61 sec)Inserting records into table. The query is as follows −mysql> insert into RandomIntegerDemo values(1), (2), (3), ... Read More

Rishi Rathor
334 Views
Use the :after element to add some content after an element. ExampleYou can try to run the following code to insert some content after an element with CSS −Live Demo p:after { ... Read More

Rishi Rathor
6K+ Views
If a method is declared as static, it is a member of a class rather than belonging to the object of the class. It can be called without creating an object of the class. A static method also has the power to access static data members of the class.A static ... Read More

Rishi Rathor
7K+ Views
Errors and Error Correcting CodesErrors in data occur when bits get corrupted in the data. When bits are transmitted over the computer network, they are subject to get corrupted due to interference and network problems, leading to errors.Error-correcting codes (ECC) are a sequence of numbers generated by specific algorithms for ... Read More