SQL Test

Beschreibung

Basic SQL Test
rahim.ali
Quiz von rahim.ali, aktualisiert more than 1 year ago
rahim.ali
Erstellt von rahim.ali vor mehr als 8 Jahre
357
1

Zusammenfassung der Ressource

Frage 1

Frage
Which of the following code would grant the role student_admin to a user named william?
Antworten
  • A - grant student_admin to william;
  • B - grant to william student_admin;
  • C - grant william student_admin;
  • D - None of the above.

Frage 2

Frage
Select the right query for retrieving records from the tables HONOURS_SUBJECT and LOCATIONS with a right outer join HONOURS_SUBJECT(subject_code, subject_name, department_head); LOCATIONS(subject_code, department_name, location_id, city);
Antworten
  • A - select h.subject_name, l.department_name, h.department_head, l.city from honours_subject h on right outer join location l where(h.subject_code = l.subject_code);
  • B - select h.subject_name, l.department_name, h.department_head, l.city from honours_subject h outer join location l on(subject_code);
  • C - select h.subject_name, l.department_name, h.department_head, l.city from honours_subject h right outer join location l on(h.subject_code = l.subject_code);
  • D - None of the above.

Frage 3

Frage
Q - Which of the following code will remove all the rows from the table LOCATIONS?
Antworten
  • A - DROP TABLE locations;
  • B - DELETE TABLE locations;
  • C - TRUNCATE TABLE locations;
  • D - None of the above.

Frage 4

Frage
Which of the following is not true about modifying rows in a table?
Antworten
  • A - Existing rows in a table are modified using the UPDATE statement.
  • B - You can update more than one row at a time.
  • C - All the rows in a table are modified if you omit the WHERE clause.
  • D - None of the above.

Frage 5

Frage
Consider the following schema − STUDENTS(student_code, first_name, last_name, email, phone_no, date_of_birth, honours_subject, percentage_of_marks); Which of the following query would display the distinct honours subjects in the STUDENTS table?
Antworten
  • A - select honours_subject from students;
  • B - select distinct honours_subject from students;
  • C - select all honours_subject from students;
  • D - select * from students;

Frage 6

Frage
Q 12 - Which of the following is not a character manipulation function?
Antworten
  • A - concat
  • B - substr
  • C - instr
  • D - coalesce

Frage 7

Frage
Q 14 - Which of the following is true about inserting news rows to a table?
Antworten
  • A - You must list values in the default order of the columns in the table.
  • B - You can also list the columns in the INSERT clause.
  • C - You can use the INSERT statement to add rows from one table to another.
  • D - All of the above.

Frage 8

Frage
Given the following data definition, select all queries that return a list of employees who are not managers. TABLE emp id INTEGER NOT NULL PRIMARY KEY mgrId INTEGER REFERENCES emp (id) name VARCHAR(30) NOT NULL
Antworten
  • A SELECT e.name FROM emp e WHERE e.id NOT IN ( SELECT DISTINCT m.mgrId FROM emp m)
  • B SELECT e.name FROM emp e WHERE e.id NOT IN ( SELECT DISTINCT m.mgrId FROM emp m WHERE m.mgrId IS NOT NULL)
  • C SELECT e.name FROM emp e WHERE e.id NOT IN ( SELECT m.mgrId FROM emp m)
  • D SELECT e.name FROM emp e WHERE e.id NOT IN ( SELECT m.mgrId FROM emp m WHERE m.mgrId IS NOT NULL)

Frage 9

Frage
9. Which of the follwing statements is/are not true for SQL profiler?
Antworten
  • enables you to monitor events
  • check if rows are being inserted properly
  • check the performance of a stored procedure
  • ALL answers are correct
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Abiturvorbereitung (6 Monate)
AntonS
Zellorganellen
Sarah K.
IKA-Theoriefragen Serie 17 (15 Fragen)
IKA ON ICT GmbH
Vertragsrecht - Multiple-Choice-Test
Maximilian Mustermann
Bio-Sortiment
Sarah Huber
Verben mit Präpositionen
Gamze Ü
Vetie - Pathologie 2016
Fioras Hu
Vetie - Allgemeine Pathologie
Fioras Hu
Vetie- Innere 2017
Ju Pi
Repro 2017 Vetie
Kim Langner
Vetie: Milch 2020 Matrikel 14
Johanna Tr