We can use the IF CONDITION in update query, given blow example will show how we can use the IF Condition in update query. Suppose we have a table that has 2 column first is Name and second is Gender,…
The AVG function return the average value of the specified column. For example I have a table of product list and now I want the total of price and average price of all the products. id name price 43245 Jeans…
The main difference between mysql table type MyISAM and InnoDB is that InnoDB supports transaction by MyISAM does not. MyISAM support full text search but InnoDB does not. InnoDB supports some new features: Transactions, row level locking, foreign keys. If…
Let’s say we have a MySQL table where one column (date or datetime type) is named creation-date and contains dates in one of the YYYY-MM-DD or YYYY-MM-DD HH:MM:SS formats from the past and we need to calculate the difference in…