QuestionQ50Verified/Using the SET OperatorsCopy linkReport a problemAsk AstroTutorSave questionEvaluate this SQL statement: Which statement is true about the outcome of the query above?AIt executes successfully and displays rows in the descending order of PROMO_CATEGORY.BIt produces an error because positional notation cannot be used in the order by clause with set operators.CIt executes successfully but ignores the order by clause because it is not located at the end of the compound statement.DIt produces an error because the order by clause should appear only at the end of a compound query-that is, with the last select statement.Show AnswerAnswerExplanationIn an Oracle compound query using UNION, positional notation such as ORDER BY 2 is valid, but the ORDER BY clause may appear only in the final component query and applies to the entire combined result. Placing it in the first SELECT before UNION produces an error.Learn moreOracle Database SQL Language Reference: Sorting Query ResultsShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion