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’;

1 Answer

Answer :

Answer: C

Related questions

Description : Consider a database table R with attributes A and B. Which of the following SQL queries is illegal ? (A) SELECT A FROM R; (B) SELECT A, COUNT(*) FROM R; (C) SELECT A, COUNT(*) FROM R GROUP BY A; (D) SELECT A, B, COUNT(*) FROM R GROUP BY A, B;

Last Answer : (B) SELECT A, COUNT(*) FROM R;

Description : Consider the following two commands C1 and C2 on the relation R from an SQL database:  C1: drop table R; C2: delete from R; Which of the following statements is TRUE? I. Both C1 and C2 delete the schema for R. II. C2 ... R. (A) I only (B) I and II only (C) II and III only (D) I, II and III

Last Answer : (C) II and III only

Description : Consider the following schemas: Branch = (Branch-name, Assets, Branch-city) Customer = (Customer-name, Bank-name, Customer-city) Borrow = (Branch-name, loan-number, customer account-number) Deposit = ... )) (C) πcustomer-name(σbalance> 10000(Borrow)) (D) σcustomer-name(σbalance> 10000(Borrow))

Last Answer : (A) πcustomer-name(σbalance> 10000(Deposit)) 

Description : 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 ... number of rows returned by the SQL query (c) ? (A) 3 (B) 7 (C) 10 (D) 21

Last Answer : (C) 10

Description : The statement in SQL which allows to change the definition of a table is (A) Alter. (B) Update. (C) Create. (D) select

Last Answer : (A) Alter.

Description : …………… table store information about database or about the system. A) SQL B) Nested C) System D) None of these

Last Answer : C) System

Description : Consider the following database table having A, B, C and D as its four attributes and four possible candidate keys (I, II, III and IV) for this table: I: {B} II: {B, C} III: {A, D} IV: {C, D} If ... the database table? (A) I and III only (B) III and IV only (C) II only (D) I only

Last Answer : (C) II only

Description : 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 ... (A) 2 and 6 respectively (B) 6 and 2 respectively (C) 2 and 4 respectively (D) 4 and 2 respectively

Last Answer : (D) 4 and 2 respectively

Description : In a relational database model, NULL values can be used for all but which one of the following? (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL. (B) To ... D) To fill a column in a tuple when that column does not really exist for that particular tuple.

Last Answer : (A) To allow duplicate tuples in the table by filling the primary key column(s) with NULL.

Description : In JDBC ........................ imports all Java classes concerned with database connectivity. A) javax.sql.* B) java.mysql.* C) java.sql.* D) com.*

Last Answer : C) java.sql.*

Description : In distributed databases, location transparency allows for database users, programmers and administrators to treat the data as if it is at one location. A SQL query with location transparency needs to specify: (A) Inheritances (B) Fragments (C) Locations (D) Local formats 

Last Answer : (B) Fragments

Description : 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 ?  (A) 5 (B) 10 (C) 15 (D) 50

Last Answer : (A) 5 

Description : Which of the following is FALSE in C? A) Keywords can be used as variable names B) Variable names can contain a digit C) Variable names do not contain a blank space D) Capital letters can be used in variables

Last Answer : A) Keywords can be used as variable names

Description : To select all column from the table the syntax is: A) select all from table_name B) select * from table_name C) select from table_name D) Non of the above

Last Answer : B) select * from table_name

Description : Consider the relations R(A,B) and S(B,C) and the following four relational algebra queries over R and S: I. πA,B(R⋈S) II. R⋈πB(S) III. R∩(πA(R) Χ πB(S)) IV. πA,R.B(R Χ S) where R.B refers to ... IV are the same query. (C) I, II and IV are the same query. (D) I, III and III are the same query.

Last Answer : (D) I, III and III are the same query.

Description : Which of the following is a legal expression in SQL? (A) SELECT NULL FROM EMPLOYEE; (B) SELECT NAME FROM EMPLOYEE; (C) SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL; (D) None of the above

Last Answer : B) SELECT NAME FROM EMPLOYEE;

Description : Branch logic determines which should be adopted to select the next_ value among possibilities. a. CAR b. GAR c. HAR d. TAR

Last Answer : a. CAR

Description : Consider the table Student(stuid, name, course, marks). Which one of the following two queries is correct to find the highest marks student in course 5? Q.1. Select S.stuid From student S Where not exists (select * from student ... ) Q.1 (B) Q.2 (C) Both Q.1 and Q.2 (D) Neither Q.1 nor Q.2

Last Answer : (B) Q.2 Explanation: First query gives stuid of students whose marks are greater than all students taking course 5. Second query gives stuid of students whose marks are greater than any student taking ... comparison is between maximum of marks by any student in course 5. So the answer is option D.

Description : SQL server stores index information in the ………… system table A) systindexes B) systemindexes C) sysind D) sysindexes

Last Answer : D) sysindexes

Description : Which of the following is true ? I. Implementation of self-join is possible in SQL with table alias. II. Outer-join operation is basic operation in relational algebra. III. Natural join and outer join operations are ... (B) II and III are correct. (C) Only III is correct. (D) Only I is correct.

Last Answer : (D) Only I is correct.

Description : What command is used to remove a table or index from a SQL database ?

Last Answer : DROP TABLE is used to remove a table or index from a SQL database .

Description : SQL> SELECT * FROM MY_SCHEMA.MY_TABLE; SP2-0678: Column or attribute type cannot be displayed by SQL*Plus Why I’m getting this error?

Last Answer : The table has a BLOB column.

Description : An Assertion is a predicate expressing a condition we wish database to always satisfy. The correct syntax for Assertion is : (A) CREATE ASSERTION ‘ASSERTION Name’ CHECK ‘Predicate’ (B) CREATE ASSERTION ‘ASSERTION NAME’ (C) CREATE ASSERTION, CHECK Predicate (D) SELECT ASSERTION

Last Answer : (A) CREATE ASSERTION ‘ASSERTION Name’ CHECK ‘Predicate’ 

Description : The one guideline to be followed while designing the database is A) A database design may be ambiguous. B) Unrelated data should be in the same table so that updating the data will be easy. C) It should avoid/reduce the redundancy. D) An entity should not have attributes.

Last Answer : C) It should avoid/reduce the redundancy.

Description : The given maximization assignment problem can be converted into a minimization problem by (A) subtracting each entry in a column from the maximum value in that column. (B) subtracting each entry in the table ... value in that column. (D) adding maximum value of the table to each entry in the table.

Last Answer : (B) subtracting each entry in the table from the maximum value in that table.

Description : maxvalue.sql Select the Nth Highest value from a table?

Last Answer : select level, max('col_name') from my_table where level = '&n' connect by prior ('col_name') > 'col_name') group by level; Example: Given a table called emp with the following columns: -- id number -- name ... , max(sal) from emp -- where level=2 -- connect by prior sal > sal -- group by level

Description : minvalue.sql Select the Nth lowest value from a table?

Last Answer : select level, min('col_name') from my_table where level = '&n' connect by prior ('col_name') < 'col_name') group by level; Example: Given a table called emp with the following columns: -- id number -- name ... , min(sal) from emp -- where level=2 -- connect by prior sal < sal -- group by level

Description : Consider the following table Furniture. Write SQL commands for the statements (i) to (viii) and write output for SQL queries (ix) and (x). -Technology

Last Answer : SQL commands for the given statements (i) to (viii) ;1. SELECT FCODE, NAME. PRICE FROM Furniture WHERE PRICE < 5000;2. SELECT NAME. PRICE FROM Furniture3.4. WHERE NAME LIKE %table% ;5. SELECT DISTINCT WCODE ... ;15.16. Output for SQL queries (ix) and (x)(ix)SUM(PRICE)6500(x)COUNT(DISTINCT PRICE)5

Description : Point out the wrong statement. a) Wolf Frameworks uses a C# engine and supports both Microsoft SQL Server and MySQL database b) Applications built in Wolf are 50-percent browser-based ... and multisource overlaid content c) Google applications are cloud-based applications d) None of the mentioned

Last Answer : Applications built in Wolf are 50-percent browser-based and support mashable and multisource overlaid content

Description : Point out the wrong statement. a) Wolf Frameworks uses a C# engine and supports both Microsoft SQL Server and MySQL database b) Applications built in Wolf are 50-percent browser-based ... and multisource overlaid content c) Google applications are cloud-based applications d) None of the mentioned

Last Answer : Applications built in Wolf are 50-percent browser-based and support mashable and multisource overlaid content

Description : . Which of the following is a comparison operator in SQL? (A) = (B) LIKE (C) BETWEEN (D) All of the above

Last Answer : D) All of the above

Description : An outstanding functionality of SQL is its support for automatic ………… to the target data. A) programming B) functioning C) navigation D) notification

Last Answer : C) navigation

Description : MS-SQL stores data in a ........................ file format. A) .DAT B) .MDB C) .MSSQL D) .OBJ

Last Answer : A) .DAT

Description : For execution of DELETE SQL query in JDBC, ............. method must be used. A) executeQuery() B) executeDeleteQuery() C) executeUpdate() D) executeDelete()

Last Answer : C) executeUpdate()

Description : ............... joins are SQL server default A) Outer B) Inner C) Equi D) None of the above

Last Answer : B) Inner

Description : ………….. is a utility to capture a continuous record of server activity and provide auditing capability. A) SQL server Profile B) SQL server service manager C) SQL server setup D) SQL server wizard.

Last Answer : B) SQL server service manager

Description : ………………… is a full form of SQL. A) Standard query language B) Sequential query language C) Structured query language D) Server side query language

Last Answer : A) Standard query language

Description : Which of the following is a valid SQL type? (A) CHARACTER (B) NUMERIC (C) FLOAT (D) All of the above

Last Answer : (D) All of the above

Description : ‘AS’ clause is used in SQL for (A) Selection operation. (B) Rename operation. (C) Join operation. (D) Projection operation.

Last Answer : (B) Rename operation.

Description : Who invented the GAR air-air mini nuke?

Last Answer : howard hughes invented the GAR air to air dropped from a jet mini nuke just as WW-II ended.It was invented to nuke the SS aircraft but was never used until starfish prime-A nuke space ... cuban/russians 200 nukes in Cuba but knocking out the remote controls which also knocked out most satelites

Description : From the following document , which is the supporting document for submission of TA Bills a. GAR 14 –C b TA-14 C. GPR-23

Last Answer : a. GAR 14 –C

Description : Consider a hash table of size m=100 and the hash function h(k) = floor(m(kA mod 1)) for A = (√5 − 1)/2 = 0.618033. Compute the location to which the key k = 123456 is placed in hash table. (A) 77 (B) 82 (C) 88 (D) 89

Last Answer : (C) 88

Description : Consider a subnet with 720 routers. If a three-level hierarchy is choosen with eight clusters, each containing 9 regions of 10 routers, then total number of entries in the routing table is ................... (A) 25 (B) 27 (C) 53 (D) 72

Last Answer : Answer: A  Explanation: Each router needs 10 entries for local routers, 8 entries for routing to other regions within its own cluster, and 7 entries for distant clusters, for a total of 25 entries.