Author Question: Explain how to combine queries using the UNION clause. What will be an ideal ... (Read 69 times)

geoffrey

  • Hero Member
  • *****
  • Posts: 880
Explain how to combine queries using the UNION clause.
 
  What will be an ideal response?

Question 2

Validation can protect against SQL injection attacks.
 
  Indicate whether the statement is true or false.


aburgess

  • Sr. Member
  • ****
  • Posts: 361
Answer to Question 1

The UNION clause is used to combine the output of multiple queries into one set of output. In order for the union to work, each query must return the same number of columns. Also, each output column must be union compatible, meaning it is of the same type. The CAST command can be used to convert from one datatype to another if need be. If you wish to order the output rows, you must specify an ORDER BY clause in the last query.

Answer to Question 2

Answer: TRUE



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
 

Did you know?

Cytomegalovirus affects nearly the same amount of newborns every year as Down syndrome.

Did you know?

Acetaminophen (Tylenol) in overdose can seriously damage the liver. It should never be taken by people who use alcohol heavily; it can result in severe liver damage and even a condition requiring a liver transplant.

Did you know?

To combat osteoporosis, changes in lifestyle and diet are recommended. At-risk patients should include 1,200 to 1,500 mg of calcium daily either via dietary means or with supplements.

Did you know?

Patients who have undergone chemotherapy for the treatment of cancer often complain of a lack of mental focus; memory loss; and a general diminution in abilities such as multitasking, attention span, and general mental agility.

Did you know?

For pediatric patients, intravenous fluids are the most commonly cited products involved in medication errors that are reported to the USP.

For a complete list of videos, visit our video library