1. Question: The simplest query must include at least________ and _________.

    A
    A select clause

    B
    A where clause

    C
    A from clause

    D
    A group by clause

    E
    A having clause

    F
    An order by clause

    Note: Not available
    1. Report
  2. Question: Which of the following are aggregate functions in SQL?

    A
    Avg

    B
    Select

    C
    Order By

    D
    Sum

    E
    Union

    F
    Group by

    G
    Having

    Note: Not available
    1. Report
  3. Question: Which logical operator can reverse the result?

    A
    AND

    B
    OR

    C
    NOT

    D
    ANY

    Note: Not available
    1. Report
  4. Question: What are the programs that execute automatically whenever DML operations are performed on tables called?

    A
    Triggers

    B
    Procedures

    C
    Functions

    D
    None of the above

    Note: Not available
    1. Report
  5. Question: The primary key index does not allow ________ data in a field.

    A
    Numeric

    B
    Characte

    C
    Date

    D
    Null

    E
    Duplicate

    F
    All of the above

    Note: Not available
    1. Report
  6. Question: Which character function should be used to return a specified portion of a character string?

    A
    CONCAT

    B
    LENGTH

    C
    SUBSTR

    D
    INITCAP

    Note: Not available
    1. Report
  7. Question: Which one of the following correctly selects rows from the table myTable that have null in column column1?

    A
    SELECT * FROM myTable WHERE column1 is null

    B
    SELECT * FROM myTable WHERE column1 = null

    C
    SELECT * FROM myTable WHERE column1 EQUALS null

    D
    SELECT * FROM myTable WHERE column1 NOT null

    E
    SELECT * FROM myTable WHERE column1 CONTAINS null

    Note: Not available
    1. Report
  8. Question: What does the following Update statement do? Update OrderTable set OrderDiscount=OrderDiscount*1.10What does the following Update statement do? Update OrderTable set OrderDiscount=OrderDiscount*1.10

    A
    Increases OrderDiscount of first row by 10%

    B
    Increases OrderDiscount of all rows by 10%

    C
    Does nothing without where clause

    D
    Gives an error due to lack of where clause

    Note: Not available
    1. Report
  9. Question: Consider the following table structure of students: rollno number(4) name varchar(20) course varchar(20) What will be the query to display the courses in which the number of students enrolled is more than 5?

    A
    Select course from students where count(course) > 5;

    B
    Select course from students where count(*) > 5 group by course;

    C
    Select course from students group by course;

    D
    Select course from students group by course having count(*) > 5;

    E
    Select course from students group by course where count(*) > 5;

    F
    Select course from students where count(group(course)) > 5;

    G
    Select count(course) > 5 from students;

    H
    None of the above

    Note: Not available
    1. Report
  10. Question: Consider the following tables: Books ------ BookId BookName AuthorId SubjectId PopularityRating (the popularity of the book on a scale of 1 to 10) Language (such as French, English, German etc) Subjects --------- SubjectId Subject (such as History, Geography, Mathematics etc) Authors -------- AuthorId AuthorName Country What is the query to determine which Authors have written at least 1 book with a popularity rating of less than 5?

    A
    select authorname from authors where authorid in (select authorid from books where popularityrating<5)

    B
    select authorname from authors where authorid in (select authorid from books where popularityrating<=5)

    C
    select authorname from authors where authorid in (select BookId from books where popularityrating<5)

    D
    select authorname from authors where authorid in (select authorid from books where popularityrating in (0,5))

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd