Tag: programming languages

Questions Related to programming languages

What is the result of the following operation? System.out.println(4 | 3);

  1. 6

  2. 0

  3. 1

  4. 7


Correct Option: D
  1. WHERE

  2. HAVING

  3. RESTRICT

  4. GROUP BY

  5. ORDER BY


Correct Option: B
Explanation:

To answer this question, the user needs to understand the purpose of each of the SQL clauses listed and how they are used in a query.

  • WHERE: This clause is used to filter rows of data based on a specified condition or set of conditions. It is used to limit which rows are selected from a table.

  • HAVING: This clause is used to filter the results of an aggregate function applied to a group of rows. It is used to limit which groups are displayed based on a specified condition or set of conditions.

  • RESTRICT: There is no such SQL clause as RESTRICT.

  • GROUP BY: This clause is used to group rows of data based on one or more columns. It is used in conjunction with aggregate functions to calculate results for each group of data.

  • ORDER BY: This clause is used to sort the results of a query by one or more columns in ascending or descending order.

Based on the above information, the correct answer to the question is:

The Answer is: B. HAVING.

The HAVING clause is used to filter the results of an aggregate function applied to a group of rows. It is used to limit which groups are displayed based on a specified condition or set of conditions. Therefore, it can be used to exclude group results that don't meet the specified condition(s).

  1. MAX

  2. MIN

  3. SUM

  4. COUNT

  5. TOTAL

  6. LARGEST


Correct Option: C
Explanation:

To calculate the total of all salaries in the accounting department, you need to use the SUM function.

Option A (MAX) returns the highest value in a set of values.

Option B (MIN) returns the lowest value in a set of values.

Option C (SUM) is the correct option. It returns the sum of all values in a set of values.

Option D (COUNT) returns the number of values in a set of values.

Option E (TOTAL) is not a valid function in SQL.

Option F (LARGEST) is not a valid function in SQL.

Therefore, the answer is: C. SUM.

Which constraint can be defines only at the column level?

  1. UNIQUE

  2. NOT NULL

  3. CHECK

  4. PRIMARY KEY

  5. FOREIGN KEY


Correct Option: B

Which is an /SQL*Plus command?

  1. INSERT

  2. UPDATE

  3. SELECT

  4. DESCRIBE

  5. DELETE


Correct Option: D
  1. Is sizeof a keyword?
  1. True

  2. False


Correct Option: B