Instead of using a semicolon (;) terminator symbol, is there any other built-in-commands which execute the MySQL query?

V Jyothi
Published on 22-Feb-2018 06:05:07
With the help of the following built-in commands, MySQL can execute a query even if semicolon (;) terminator symbol is not used.egoWe can use this command by using \G option. It means to send the current statement to the server to be executed and display the result in vertical format. ... Read More

Which statement, other than START TRANSACTION, is used for starting a transaction?

Sharon Christine
Published on 22-Feb-2018 06:01:14
We can also use the BEGIN statement to start a new transaction. It is the same as the START TRANSACTION statement.Examplemysql> BEGIN; Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO Marks Values(1, 'Aarav', 'History', 40); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO Marks ... Read More

While using the ROLLUP modifier, is it possible to use a MySQL ORDER BY clause to sort the result?

usharani
Published on 22-Feb-2018 05:58:25
Actually ROLLUP and ORDER BY are mutually exclusive in MySQL hence it is not a good practice to use both of them in a query. But still, if we use ROLLUP in ORDER BY then the main disadvantage is that the summary rows would get sorted along with the rows ... Read More

What would be the effect on summary output when I use explicit sort order (ASC or DESC) with column names in the GROUP BY list along with “WITH ROLLUP” modifier?

Nikitha N
Published on 22-Feb-2018 05:59:01
In the case, where we use explicit sort order (ASC or DESC) with column names in the GROUP BY list along with the “WITH ROLLUP” modifier, the summary rows added by ROLLUP still appear after the rows from which they calculated regardless of the sort order.As we know that the ... Read More

How can a user start new MySQL transaction?

Anjana
Published on 22-Feb-2018 05:55:14
By running the command START TRANSACTION, a user can start new MySQL transaction. The behavior of the transaction will depend upon the SQL AUTOCOMMIT mode. The default mode is ‘AUTOCOMMIT ON’ mode where each MySQL statement is considered as a complete transaction and committed by default when it finishes. It ... Read More

How MySQL manage the behavior of a transaction?

Kumar Varma
Published on 22-Feb-2018 05:54:41
MySQL can manage the behavior of a transaction with the help of the following two modes −Autocommit OnIt is the default mode. In this mode, each MySQL statement (within a transaction or not) is considered as a complete transaction and committed by default when it finishes. It can be started ... Read More

In MySQL, how we can get the total value by category in one output row?

Srinivas Gorla
Published on 22-Feb-2018 05:52:51
With the help of the MySQL SUM() function, we can get the total value by category in one output row. For example in table ‘ratelist’ if we want to get the total value of category ‘price’ then we can use SUM() on price as follows −mysql> select SUM(price) as totalprice ... Read More

What happens if MySQL query returns no rows?

varun
Published on 22-Feb-2018 05:51:51
From the output returned by MySQL, it is very much clear that how many rows are there in the result set along with the execution time.ExampleFor example, in the following MySQL output we can see there are 3 rows in the result set.mysql> Select * from ratelist ORDER BY Price ... Read More

How can we implement a MySQL transaction?

Ankith Reddy
Published on 22-Feb-2018 05:51:59
As we know that in a transaction, statements are executed as a unit. If any operation within the transaction fails, the entire transaction will fail and should be rolled back; otherwise, any changes made by the statements are saved to the database. For implementing a transaction MySQL provides the following ... Read More

What do you mean by a transaction in MySQL? Explain along with its properties?

Samual Sam
Published on 22-Feb-2018 05:48:21
A transaction is a sequential group of database manipulation operations, which is performed as if it were one single work unit. In other words, a transaction will never be complete unless each individual operation within the group is successful. If any operation within the transaction fails, the entire transaction will ... Read More
Advertisements