SQL Fundamentals and Database Concepts

Test your knowledge of SQL commands, database operations, and Oracle-specific features including SELECT statements, table creation, views, constraints, and data manipulation.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

When a user creates an object without a TABLESPACE clause, where will Oracle store the segment?

  1. System tablespace
  2. Users tablespace
  3. Default tablespace for the user
  4. Oracle will give an error
Question 2 Multiple Choice (Single Answer)

Which character is used to continue a statement in SQL*Plus?

  1. *
  2. /
  3. -
  4. @
Question 3 Multiple Choice (Single Answer)

To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?

  1. 5
  2. 4
  3. 3
  4. There is no such criteria
Question 4 Multiple Choice (Single Answer)

Which of the following SQL functions can operate on any datatype?

  1. TO_CHAR
  2. LOWER
  3. LPAD
  4. MAX
Question 5 Multiple Choice (Single Answer)

Choose correct syntax to insert values into r4r_team table

  1. INSERT INTO r4r_team (id, username, exp) VALUES (1, ‘r4r01’, ‘2’);
  2. INSERT INTO r4r_team VALUES (1, ‘r4r01’, ‘2’);
  3. INSERT INTO r4r_team (id, username, exp) VALUE (1, ‘r4r01’, ‘2’);
  4. INSERT INTO table r4r_team (id, username, exp) VALUE (1, ‘r4r01’, ‘2’);
Question 6 True/False

<> and != both are same operator into SQL

  1. True
  2. False
Question 7 Multiple Choice (Single Answer)

Choose true option

  1. BETWEEN -->>Used for range with in values
  2. LIKE -->>Used for Search a pattern
  3. IN -->>return east one of the columns in given set of values
  4. 1,2,3
Question 8 True/False

Truncate is faster than delete

  1. True
  2. False
Question 9 True/False

delete will lower the water mark

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

Which of the following denote group clause in SQL

  1. having
  2. group by
  3. where
  4. both 1 and 2
Question 11 True/False

If base table does not exists, can we create a view?

  1. True
  2. False
Question 12 Multiple Choice (Single Answer)

If the base table of a view is deleted and we give SQL Select command on view table name

  1. Gives the columns referred in select statement of view
  2. Reports a error
  3. Select only particular columns of view table
  4. Outputs the whole view table
Question 13 Multiple Choice (Single Answer)

Which of the following data types are used in SQL?

  1. Long
  2. Date
  3. rowid
  4. all above
Question 14 Multiple Choice (Single Answer)

Which of the following SQL statement create a sequence SE with starting value as 30 and in increments of 20?

  1. GENERATE SEQUENCE SE START WITH 30 ADD BY 20;
  2. CREATE SEQUENCE SE START WITH 30 ADD BY 20;
  3. CREATE SEQUENCE SE START WITH 30 INCREMENT BY 20;
  4. GENERATE SEQUENCE SE INITIATE WITH 30 INCREMENT BY 20;
Question 15 Multiple Choice (Single Answer)

Which of the following is TRUE about Primary Key?

  1. Same value of Primary Key can appear in more than one row in the table
  2. A Primary key defined column can be of type LONG
  3. A column that is defined as Primary Key cannot contain NULL value
  4. Both A. and B.
Question 16 Multiple Choice (Single Answer)

Which of the following is not allowed while creating a table using CRRATE TABLE in SQL?

  1. Table name can be an oracle reserved word
  2. Table names must begin with a letter
  3. Table names can contain in it numbers also
  4. None of the Above
Question 17 Multiple Choice (Single Answer)

With SQL, how can you return the number of records in the "Persons" table?

  1. SELECT COLUMNS(*) FROM Persons
  2. SELECT COUNT() FROM Persons
  3. SELECT COUNT(*) FROM Persons
  4. SELECT COLUMNS() FROM Persons
Question 18 Multiple Choice (Single Answer)

Which SQL keyword is used to sort the result-set?

  1. order
  2. sort
  3. order by
  4. sort by
Question 19 Multiple Choice (Single Answer)

Which SQL statement is used to return only different values?

  1. SELECT DIFFERENT
  2. SELECT DISTINCT
  3. SELECT UNIQUE
  4. SELECT PRIMARY
Question 20 Multiple Choice (Single Answer)

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

  1. SELECT * FROM Persons WHERE FirstName LIKE '%a'
  2. SELECT * FROM Persons WHERE FirstName='a'
  3. SELECT * FROM Persons WHERE FirstName LIKE 'a%'
  4. SELECT * FROM Persons WHERE FirstName='%a%'