adplus-dvertising
frame-decoration

Question

Consider a “CUSTOMERS” database table having a column “CITY” filled with all the names of Indian cities (in capital letters). The SQL statement that finds all cities that have “GAR” somewhere in its name, is:

a.

Select *from customers where city=’%GAR%’;

b.

Select *from customers where city=’$GAR$’;

c.

Select *from customers where city like ‘%GAR%’;

d.

Select *from customers where city as ’%GAR’;

Answer: (c).Select *from customers where city like ‘%GAR%’;

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Consider a “CUSTOMERS” database table having a column “CITY” filled with all the names of Indian cities (in capital letters). The SQL statement that finds all cities that have...

Similar Questions

Discover Related MCQs

Q. Match the following database terms to their functions:

List-I                                       List-II
(a) Normalization                     (i) Enforces match of primary key to foreign key
(b) Data Dictionary                  (ii) Reduces data redundancy in a database
(c) Referential Integrity           (iii) Define view(s) of the database for particular user(s).
(d) External Schema               (iv) Contains metadata describing database structure.

Codes:
      (a)   (b)   (c)    (d)

Q. Which of the following provides the best description of an entity type?

Q. Data which improves the performance and accessibility of the database are called:

Q. A relation R={A,B,C,D,E,F,G} is given with following set of functional dependencies:

F={AD→E, BE→F, B→C, AF→G}

Which of the following is a candidate key?

Q. The hash function used in double hashing is of the form:

Q. Which of the following statements regarding the features of the object-oriented approach to databases are true ?

(a) The ability to develop more realistic models of the real world.
(b) The ability to represent the world in a non-geometric way.
(c) The ability to develop databases using natural language approaches.
(d) The need to split objects into their component parts.
(e) The ability to develop database models based on location rather than state and behaviour.

Q. Consider the following database table :

Create table test(
one integer,
two integer,
primary key(one),
unique(two),
check(one≥1 and ≤10),
check(two≥1 and ≤5) );

How many data records/tuples atmost can this table contain ?

Q. Suppose ORACLE relation R(A, B) currently has tuples {(1, 2), (1, 3), (3, 4)} and relation S(B, C) currently has {(2, 5), (4, 6), (7, 8)}. Consider the following two SQL queries SQ1 and SQ2 :

SQ1 : Select *
From R Full Join S
On R.B=S.B;
SQ2 : Select *
From R Inner Join S
On R.B=S.B;

The numbers of tuples in the result of the SQL query SQ1 and the SQL query SQ2 are given by :

Q. Consider the following three SQL queries (Assume the data in the people table) :

(a) Select Name from people where Age>21;
(b) Select Name from people where Height>180;
(c) Select Name from people where (Age>21) or (Height>180);

If the SQL queries (a) and (b) above, return 10 rows and 7 rows in the result set respectively, then what is one possible number of rows returned by the SQL query (c) ?

Q. Manager's salary details are hidden from the employee. This is called as

Q. Which of the following statements is false ?

Q. A clustering index is created when ................

Q. Let R ={A, B, C, D, E, F} be a relation schema with the following dependencies C→F,E→A,EC→D,A→B
Which of the following is a key for R ?

Q. Match the following:

List-I                                          List-II
a. DDL                                        i. LOCK TABLE
b. DML                                       ii. COMMIT
c. TCL                                        iii. Natural Difference
d. BINARY Operation             iv. REVOKE

​Codes:
      a    b    c    d

Q. The student marks should not be greater than 100. This is

Q. Usage of Preemption and Transaction Rollback prevents ..................

Q. Views are useful for ................. unwanted information, and for collecting together information from more than one relation into a single view.

Q. Cross_tab displays permit users to view ................ of multidimensional data at a time.

Q. Thoma’s-write rule is .................

Q. .................. constraints ensure that a value that appears in one relation for a given set of attributes also appears for a certain set of attributes in another relation.