SQL Objective Question And Answers

                                                                                             

1)      Which of the following SQL clauses is used to DELETE data from a database table?

1)      REMOVE
2)      CLEAR
3)      DROP DATA
4)      DELETE


2)      If you join a table to itself, what kind of join are you using?

1.      You can't join a table to itself.
2.      Selective Join.
3.      Self Join

3)      Which of the following SQL statements has correct syntax?

1.      SELECT * FROM Table1 WHERE Column1 => 10
2.      SELECT * FROM Table1 WHERE Column1 >= 10
3.      SELECT * FROM Table1 WHERE Column1 = = 10

4)      Sub-queries can be nested in…

1.      UPDATE, DELETE, INSERT and SELECT statements.
2.      INSERT statements only.
3.      DELETE statements only.
4.      UPDATE statements only.

5)      Which SQL functions is used to count the number of rows in a SQL query?

1.      COUNT()
2.      SUM()
3.      NUMBER()

6)      What does the UNION operator do?
1.      The UNION operator combines the results of two or more queries into a one result that includes all the rows from the queries in the union.
2.      The UNION operator sorts the selected result set.
3.      The UNION operator behaves the same as the JOIN SQL clause.


7)      The SQL BETWEEN operator …

1.      Specifies that a column is a primary key.
2.      Specifies which tables we are selecting from.
3.      Specifies a range to test.


8)      What does SQL stand for?


1.      Strict Query Language
2.      Standard Query Language.
3.      Structured Query Language.
4.      Strong Query Language


9)      If you don't specify ASC or DESC after a SQL ORDER BY clause, the following is used by default:


1.      ASC
2.      There is no default value.
3.      DESC


10)    Which of the following SQL statements is correct?


1.      SELECT CustomerName, COUNT(CustomerName) FROM Orders GROUP BY CustomerName
2.      SELECT CustomerName, COUNT(CustomerName) FROM Orders ORDER BY CustomerName

3.      SELECT CustomerName, COUNT(CustomerName) FROM Orders


                                                                  

Related Posts:

  • DataReader vs DataSet DataReader        I.            DatReader works on a Connection oriented architecture.     II.    &nb… Read More
  • SQL Objective Type Question and Answers Database Objective Type  Question and Answers Q.1 In the relational modes, cardinality is termed as: (A) Number of tuples. (B) Number of attributes. (C) Number of tables. (D) Number of constraints. Ans: A Q.2… Read More
  • SQL - Date and Time Functions Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 … Read More
  • SQL Objective Type Question & Answers For Interview Q.1An entity set that does not have sufficient attributes to form a primary key is a (A) strong entity set. (B) weak entity set. (C) simple entity set. (D) primary entity set. Ans: B Q.2 Errors occur more often when a. data… Read More
  • Bubble Sort Bubble sort [string array] #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 50 #define N 2000 void sort_words(char *x[], int y); void swap(char **, char **); int main(void) {  … Read More

0 comments:

Post a Comment