SQL Test

Descrição

Basic SQL Test
rahim.ali
Quiz por rahim.ali, atualizado more than 1 year ago
rahim.ali
Criado por rahim.ali mais de 8 anos atrás
357
1

Resumo de Recurso

Questão 1

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

Questão 2

Questão
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);
Responda
  • 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.

Questão 3

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

Questão 4

Questão
Which of the following is not true about modifying rows in a table?
Responda
  • 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.

Questão 5

Questão
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?
Responda
  • A - select honours_subject from students;
  • B - select distinct honours_subject from students;
  • C - select all honours_subject from students;
  • D - select * from students;

Questão 6

Questão
Q 12 - Which of the following is not a character manipulation function?
Responda
  • A - concat
  • B - substr
  • C - instr
  • D - coalesce

Questão 7

Questão
Q 14 - Which of the following is true about inserting news rows to a table?
Responda
  • 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.

Questão 8

Questão
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
Responda
  • 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)

Questão 9

Questão
9. Which of the follwing statements is/are not true for SQL profiler?
Responda
  • enables you to monitor events
  • check if rows are being inserted properly
  • check the performance of a stored procedure
  • ALL answers are correct

Semelhante

Phrasal Verbs II
GoConqr suporte .
Mapas Mentais no ExamTime
Luiz Fernando
DOENÇA MENTAL E TRATAMENTO -Texto 16
eleuterapara
PROCESSO DISCIPLINAR
GoConqr suporte .
TIPOS - AÇÃO PENAL
GoConqr suporte .
Noções Gerais de Direito Tributário
Fernando Monteiro
Informática Básica
Neylor Farias Ma
Física moderna
GoConqr suporte .
Informática Para Concursos - Conceitos Iniciais (Part. 1)
ae.antunes
Pronomes ( Revisão)
Rodrigo de Freit9506
LICITAÇÕES
Mateus de Souza