Description : Write SQL query to create a table “BOOKS” with the following structure: Table: BOOKS -Technology
Last Answer : Create table Books(BOOK_ID Integer (2) Primary Key,BOOK_NAME Varchar (20),CATEGORY Varchar (20),ISSUE_DATE Date);
Description : Write SQL query to create a table “Registration” with the following structure: -Technology
Last Answer : Create table Registration(Reg_Id Integer(2) Primary Key,Name varchar(20),Course varchar(10),Join_Dt date);
Description : Write SQL query to create a table Inventory with the following structure : -Technology
Last Answer : CREATE TABLE Inventory(Material Id Integer Primary Key,Material Varchar (50) NOT NULL,Category Char,DatePurchase Date) :
Description : Write SQL query to create a table Player with the following structure : -Technology
Last Answer : CREATE TABLE Player(};
Description : Write SQL Query commands based on the following table: -Technology
Last Answer : This answer was deleted by our moderators...
Description : What is the purpose of SQL? -Technology
Last Answer : SQL is structured query language. It is a standard language of all the RDBMS.
Description : What is better: One big SQL query or several?
Last Answer : It’s difficult without examples. But what you describe seems like a simple join.
Description : What is SQL Query ?
Last Answer : SQL Query is a query that uses SQL 's DDL and DML languages to find , display , print , and perform certain conditions in one or more tables in a database .
Description : In Visual Basic .NET or Visual C# programming, when would you use Structured Query Language (SQL)? How are they executed?
Last Answer : ADO.NET handles most of the database communication for you behind-thescenes. You would only use SQL statements when generating ad-hoc queries for the database. You execute SQL statements by ... returning statements, such as DELETE, INSERT INTO, or UPDATE statements, use the ExecuteNonQuery method.
Description : SQL stands for Structured Query Language Statistical Query Language Superior Questions Lot Superior Questions Lo
Last Answer : Structured Query Language
Description : What is JDBC? Describe the steps needed to execute a SQL query using JDBC.
Last Answer : Ans. The JDBC is a pure Java API used to execute SQL statements. It provides a set of classes and interfaces that can be used by developers to write database applications. The steps needed to execute a ... . 2. Execute a SQL statement. 3. Process th results. 4. Close the connection to the database.
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 : ………………… 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 : The employee information of an Organization is stored in the relation: Employee (name, sex, salary, deptname) Consider the following SQL query Select deptname from Employee Where sex = M' ... D) Average salary of male employees in a department is more than average salary of the organization.
Last Answer : (D) Average salary of male employees in a department is more than average salary of the organization.
Description : The STUDENT information in a university is stored in the relation STUDENT (Name, Sex, Marks, DEPT_Name) Consider the following SQL Query SELECT DEPT_Name from STUDENT where SEX='M' group by ... The average marks of students is more than the average marks of male students in the University
Last Answer : (B) The average marks of male students is more than the average marks of the students in the University
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 : 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 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 relation: Works (emp_name, company_name, salary) Here, emp_name is primary key. Consider the following SQL query Select emp_name From Works T where salary>(select avg ( ... 4) Find all employees who earn more than the average salary of all employees of their company.
Last Answer : Find all employees who earn more than the average salary of all employees of their company.
Description : The following table named SummerCamp shows part of the information kept on children attending the summer camp in Shimla. -Technology
Last Answer : 1. Number of fields-62. Number of records-73. If a new child joins the SummerCamp, then SummerCamp would add a record to the table.4. If a child is shifted from one group to another, then ... the SummerCamp, then SummerCamp would delete a record of that child from the table.6. Text and Date/Time.
Description : Ms. Pari, a beginner in SQL is not able to understand the meaning of “Cancelling a Transaction”. Help her in understanding the same. -Technology
Last Answer : Cancelling a transaction means rolls the transaction to the beginning. It aborts any changes made during the transaction and the state of database is returned to what it was before the transaction began to execute.Rollback command is used for the same.
Description : Define query in the context of database. -Technology
Last Answer : A query is an inquiry into the database using the SELECT statement. These statements give you filtered data according to your conditions and specifications indicating the fields, records, and summaries which a user wants to fetch from a database.
Description : Data is stored in RDBMS in the form of (a) table (b) query -Technology
Last Answer : (a) Relational Database Management System stores data in the form of relation. As we know, relations are known as table.
Description : A query is used to retrieve data from the database based on one or more criteria. -Technology
Last Answer : False Because MS-Access 2007 supports the database object query.
Description : In a Bank’s database, there are two tables ‘Customer’ and ‘Transaction’ as shown below. Write a query to display customer’s name who has -Technology
Last Answer : (i) Select cust_name from customer c,transaction t where c.Acc_No=t.Acc_No and Transaction_Type= 'Debit';(ii)Select cust_name, t.* from customer c, transaction t where c.Acc_No=t.Acc_No;(iii) ... total amount of all type of transactions, it will only display the total of credit transactions only.
Description : Write a query to display customer’s name who has withdrawn the money. -Technology
Last Answer : Select cust_name from customer c,transaction t where c.Acc_No=t.Acc_No and Transaction_Type= 'Debit';
Description : Write a query to display customer’s name along with their transaction details. -Technology
Last Answer : Select cust_name, t.* from customer c, transaction t where c.Acc_No=t.Acc_No;
Description : Write a query to display customer’s name who have not done any transaction yet. -Technology
Last Answer : Select cust_name from customer c,transaction t where c.Acc_No!=t.Acc_No;
Description : Consider the following ORACLE relations: R(A,B,C) = {, , , , ,< 3,1,4>} S(B,C,D) = {, , , , } Consider the following two SQL queries SQ1 and SQ2: SQ1: SELECT R.B, AVG(S.B) FROM R, S WHERE R.A = S.C AND S.D ... tuples returned by SQ2 then (A) M=4, N=2 (B) M=5, N=3 (C) M=2, N=2 (D) M=3, N=3
Last Answer : (A) M=4, N=2
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 : With reference to the above given tables, write commands in SQL for (i) and (ii) and output for (iii) below: -Technology
Last Answer : (i) select TName, Passenger from Train T, Reservation R where T.TrainId=R.TrainId;(ii) select T.* from Train T, Reservation R where T.TrainId!=R.TrainId;(iii)TrainIdTNameSourceDestination3424Lucknow MailLucknowNew Delhi5400Century ExpressNew DelhiKanpur
Description : What is the use of COMMIT in sql ? -Technology
Last Answer : Commit is used to save all the DML transactions, and once saved they cannot be rolled back.
Description : Name SQL Single Row functions (for each of the following) that 1. returns a number. -Technology
Last Answer : (i) ASCII () function returns a number.(ii) LCASE () function returns lowercase letters .(iii) DAYNAME () function returns names of days.(iv) DAYOFWEEK () function returns weekday number
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 : To select tuples with some salary, Siddharth has written the following erroneous SQL statement : -Technology
Last Answer : The correct code is :SELECT ID, Salary FROM empsalaryWHERE Salary = 56000 ;
Description : Write the output of the following SQL command. select round (49.88); (a)49.88 (b)49.8 (c)49.0 (d)50 -Technology
Last Answer : The correct answer is : (a) 50
Description : The ....... command can be used to makes changes in the rows of a table in SQL. -Technology
Last Answer : The update command can be used to makes changes in the rows of a table in SQL.
Description : Write the SQL command that will display the current time and date. -Technology
Last Answer : Select now();
Description : Consider the decimal number x with value 8459.2654. Write commands in SQL to: i. round it off to a whole number -Technology
Last Answer : i. select round(8459.2654);ii.select round(8459.2654,-2);
Description : Consider the following SQL string: “Preoccupied” Write commands to display: (a)“occupied” (b)“cup” -Technology
Last Answer : commands to display:(a)“occupied” (b)“cup”
Description : Considering the same string “Preoccupied” Write SQL commands to display: (a) the position of the substring ‘cup’ in the string “Preoccupied” -Technology
Last Answer : (a)select instr 'Preoccupied' , ‘ 'cup'));(b)select left 'Preoccupied',4);
Description : Write the SQL functions which will perform the following operations: (i) To display the name of the month of the current date . -Technology
Last Answer : (i) monthname(date(now()))(ii) trim(“ Panaroma “)(iii) dayname(date(dob))(iv) instr(name, fname)(v) mod(n1,n2)
Description : The number of candidates writing three different entrance exams is in the ratio 4:5:6. There is a proposal to increase these numbers of candidates by 40%, 60% and 85% respectively. What will be the ratio of increased numbers? a) 14:15:16 b) 12:15:19 c)13:19:21 d) 14:16:19 E) None of these
Last Answer : Answer : E Given ratio of number of candidates is 4:5:6 Let the number of candidates for 3 exams be 4k, 5k and 6k respectively. After increasing, number of candidates become (140% of 4k), (160% of 5k) & (185% ... 111k/10 Now, the required new ratio is: 56k/100 : 80k/10 : 111k/10 = 56 : 80 : 111
Description : In 2001, the respective ratio of number of appeared candidates to qualified candidates was 5:2. Number of female candidates qualified in 2001 constitutes what percent of the number of appeared candidates in the same year?
Last Answer : 15%
Description : In 2004, if the difference between number of male qualified candidates and number of female qualified candidates was 120, what was the number of appeared candidates in 2004? A. 840 B. 800 C. 660 D. 600 E. 720
Last Answer : B. 800
Description : In 2003, if the number of female qualified candidates was 70, what was the respective ratio of number of female qualified candidates and number of male qualified candidates same year? A. 5:9 B. 7:11 C. 10:11 D. 10:13 E. 5:7
Last Answer : E. 5:7
Description : In 2002, 54% of appeared candidates did qualify. How many female candidates did qualify in the exam? A. 280 B. 170 C. 180 D. 250 E. 240
Last Answer : C. 180
Description : In 2001, 6400 candidates appeared at the exam and 40% of them qualified. In 2005 the ratio between qualified males and females was 3:5. What is the total number of female candidates who qualified in these two years? A. 1120 B. 1220 C. 1330 D. 1150
Last Answer : B. 1220
Description : Bala Chandra ____________ school before. The desire to become a famous novelist led him to attend the adult literacy classes. (1) never attends (2) was never attentive (3) had never attended (4) will be attending
Last Answer : 3) had never attended