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

All adverse reactions are commonly charted in red ink in the patient's record and usually are noted on the front of the chart. Failure to follow correct documentation procedures may result in malpractice lawsuits.

Did you know?

Approximately 500,000 babies are born each year in the United States to teenage mothers.

Did you know?

There can actually be a 25-hour time difference between certain locations in the world. The International Date Line passes between the islands of Samoa and American Samoa. It is not a straight line, but "zig-zags" around various island chains. Therefore, Samoa and nearby islands have one date, while American Samoa and nearby islands are one day behind. Daylight saving time is used in some islands, but not in others—further shifting the hours out of sync with natural time.

Did you know?

Hippocrates noted that blood separates into four differently colored liquids when removed from the body and examined: a pure red liquid mixed with white liquid material with a yellow-colored froth at the top and a black substance that settles underneath; he named these the four humors (for blood, phlegm, yellow bile, and black bile).

Did you know?

Russia has the highest death rate from cardiovascular disease followed by the Ukraine, Romania, Hungary, and Poland.

For a complete list of videos, visit our video library