Author Question: Explain how to combine queries using the UNION clause. What will be an ideal ... (Read 71 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?

Studies show that systolic blood pressure can be significantly lowered by taking statins. In fact, the higher the patient's baseline blood pressure, the greater the effect of statins on his or her blood pressure.

Did you know?

The liver is the only organ that has the ability to regenerate itself after certain types of damage. As much as 25% of the liver can be removed, and it will still regenerate back to its original shape and size. However, the liver cannot regenerate after severe damage caused by alcohol.

Did you know?

Alzheimer's disease affects only about 10% of people older than 65 years of age. Most forms of decreased mental function and dementia are caused by disuse (letting the mind get lazy).

Did you know?

In 1844, Charles Goodyear obtained the first patent for a rubber condom.

Did you know?

It is believed that the Incas used anesthesia. Evidence supports the theory that shamans chewed cocoa leaves and drilled holes into the heads of patients (letting evil spirits escape), spitting into the wounds they made. The mixture of cocaine, saliva, and resin numbed the site enough to allow hours of drilling.

For a complete list of videos, visit our video library