How the MySQL command that you are in the process of entering can be canceled?

Giri Raju
Updated on 22-Jun-2020 10:59:45

158 Views

Suppose if we do not want to execute a command that we are entering, then we can use a clear \c option which clears the current input. For example, the use of \c option can be done as follows −mysql> Select *     -> from\cIn the example above, when we use \c in a statement, MySQL clears the current input and returns back to the MySQL prompt for accepting other statements.

How can we convert subqueries to INNER JOIN?

Samual Sam
Updated on 22-Jun-2020 10:59:14

1K+ Views

To make it understand we are using the data from the following tables −mysql> Select * from customers; +-------------+----------+ | Customer_Id | Name     | +-------------+----------+ |           1 | Rahul    | |           2 | Yashpal  | |           3 | Gaurav   | |           4 | Virender | +-------------+----------+ 4 rows in set (0.00 sec) mysql> Select * from reserve; +------+------------+ | ID   | Day        | +------+------------+ |    1 | 2017-12-30 | | ... Read More

CSS Descendant Selector

varun
Updated on 22-Jun-2020 10:58:36

377 Views

The descendant selector in CSS is used to match all elements that are descendants of a specified element.ExampleYou can try to run the following code to implement CSS Descendent Selector:Live Demo                    div p {             background-color: orange;          }                              Para 1 in the div          Para 2 in the div             Para 3 outside the div.     Output

Flow control in try catch finally in C#

karthikeya Boyini
Updated on 22-Jun-2020 10:58:29

768 Views

The flow control in try, catch, and finally can be understood using the following example. Here, we are dividing two numbers −Example Live Demousing System; namespace ErrorHandlingApplication {    class DivNumbers {       int result;       DivNumbers() {          result = 0;       }       public void division(int num1, int num2) {          try {             result = num1 / num2;          } catch (DivideByZeroException e) {             Console.WriteLine("Exception caught: {0}", e);   ... Read More

What are the different MySQL prompts we have on the command line?

Sravani S
Updated on 22-Jun-2020 10:57:40

468 Views

As we know that after writing the first line of multiple-line queries, MySQL changes the prompt. The following table shows different MySQL prompts and it's meaning −PromptMeaning         mysql>It means MySQL is ready for a new command. →It means that MySQL is waiting for the next line of multiple-line command. ‘>It means that MySQL is waiting for the next line, waiting for the completion of a string that began with a single quote. “>It means that MySQL is waiting for the next line, waiting for the completion of a string that began with a double quote. `>It means that MySQL is waiting ... Read More

How to convert Decimal to Binary using C#?

Samual Sam
Updated on 22-Jun-2020 10:57:36

436 Views

Let’s say we want to convert the number 48 to binary.Firstly, set it and use the / and % operators and loop until the value is greater than 1 −decVal = 48; while (decVal >= 1) {    val = decVal / 2;    a += (decVal % 2).ToString();    decVal = val; }Now, display every bit of the binary as shown in the complete code −Example Live Demousing System; using System.Collections.Generic; using System.Text; namespace Demo {    class MyApplication {       static void Main(string[] args) {          int decVal;         ... Read More

How can we use two columns with MySQL WHERE clause?

radhakrishna
Updated on 22-Jun-2020 10:56:28

609 Views

It is very rarely used to use two columns of the same table in WHERE clause but still we can perform a query with two columns of the same table. Consider the below example −mysql> Select F_name, L_name     -> From Customer     -> where F_name = L_name;     Empty set (0.00 sec)Here we are using both the columns(F_Name and L_Name) from the same table(Customer) hence the result is an Empty set.

How can we convert subqueries to LEFT JOIN?

Sai Nath
Updated on 22-Jun-2020 10:55:57

2K+ Views

To make it understand we are using the data from the following tables −mysql> Select * from customers; +-------------+----------+ | Customer_Id | Name     | +-------------+----------+ | 1           | Rahul    | | 2           | Yashpal  | | 3           | Gaurav   | | 4           | Virender | +-------------+----------+ 4 rows in set (0.00 sec) mysql> Select * from reserve; +------+------------+ | ID   | Day        | +------+------------+ | 1    | 2017-12-30 | | ... Read More

LinkedList in C#

Samual Sam
Updated on 22-Jun-2020 10:55:35

2K+ Views

System.Collections.Generic namespace is available in C# for LinkedList. The LinkedList class allows insertion and deletion of elements from the list at a fast pace.C# LinkedList class uses the concept of linked list. It allows us to insert and delete elements fastly. It can have duplicate elements. It is found in System.Collections.Generic namespace.Here is an example −Example Live Demousing System; using System.Collections.Generic; class Demo {    static void Main() {       LinkedList < string > l = new LinkedList < string > ();       l.AddLast("one");       l.AddLast("two");       l.AddLast("three");     ... Read More

How can we run a MySQL statement without termination semicolon?

Ramu Prasad
Updated on 22-Jun-2020 10:55:03

490 Views

With the help of \G or \g option just at the end of the MySQL statement, we can run it without the semicolon. Consider the example below −mysql> Select * from Stock_item\G *************************** 1. row *************************** item_name: Calculator     Value: 15  Quantity: 89 *************************** 2. row *************************** item_name: Notebooks     Value: 63  Quantity: 40 *************************** 3. row *************************** item_name: Pencil     Value: 15  Quantity: 40 *************************** 4. row *************************** item_name: Pens   Value : 65 Quantity: 32 *************************** 5. row *************************** item_name: Shirts     Value: 13  Quantity: 29 *************************** 6. row *************************** item_name: Shoes     ... Read More

Advertisements