search
Log In

Recent questions tagged sql

0 votes
1 answer
1
Consider the following table structures related to a university for the below question. EMPLOYEE NAME VARCHAR (30) NOT NULL, EID VARCHAR (10) NOT NULL, DEPTNO INT (5) NOT NULL, HODEID VARCHAR (10), SALARY INT (10), PRIMARY KEY (EID), FOREIGN KEY (HODEID) ... 20,30,40); SELECT DISTINCT EMPID FROM PROJECTWORK WHERE PROJNO IN(20,30,40); SELECT DISTINCT EMPID FROM PROJECTWORK WHERE PROJNO=20,30,40;
asked Nov 20 in Databases jothee 11 views
0 votes
1 answer
2
Consider the following table structures related to a university for the below question. EMPLOYEE NAME VARCHAR (30) NOT NULL, EID VARCHAR (10) NOT NULL, DEPTNO INT (5) NOT NULL, HODEID VARCHAR (10), SALARY INT (10), PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES ... $II$ are false Statement $I$ is correct but Statement $II$ is false Statement $I$ is incorrect but Statement $II$ is true
asked Nov 20 in Databases jothee 9 views
0 votes
1 answer
3
Consider the following table structures related to a university for the below question. EMPLOYEE NAME VARCHAR (30) NOT NULL, EID VARCHAR (10) NOT NULL, DEPTNO INT (5) NOT NULL, HODEID VARCHAR (10), SALARY INT (10), PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), ... EID Choose the correct answer from the options given below: $a$ and $b$ only $a$ and $c$ only $b$ only $c$ only
asked Nov 20 in Databases jothee 9 views
0 votes
1 answer
4
Consider the following table structures related to a university for the below question. EMPLOYEE NAME VARCHAR (30) NOT NULL, EID VARCHAR (10) NOT NULL, DEPTNO INT (5) NOT NULL, HODEID VARCHAR (10), SALARY INT (10), PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), FOREIGN ... correct answer from the options given below: $a$ and $b$ only $a$ and $c$ only $b$ and $c$ only $a$ only
asked Nov 20 in Databases jothee 9 views
0 votes
1 answer
5
Consider the following table structures related to a university for the below question. EMPLOYEE NAME VARCHAR (30) NOT NULL, EID VARCHAR (10) NOT NULL, DEPTNO INT (5) NOT NULL, HODEID VARCHAR (10), SALARY INT (10), PRIMARY KEY (EID), FOREIGN KEY (HODEID) REFERENCES EMPLOYEE (EID), ... ) Choose the correct answer from the options given below: $a$ and $b$ only $a$ only $b$ and $c$ only $c$ only
asked Nov 20 in Databases jothee 10 views
0 votes
1 answer
6
Given relations $R(w,x)$ and $S(y,z),$ the result of SELECT DISTINCT $w,x$ from $R,S$ $R$ has no duplicates and $S$ is non-empty $R$ and $S$ have no duplicates $S$ has no duplicates and $R$ is non-empty $R$ and $S$ has the same number of tuples
asked Apr 1 in Databases Lakshman Patel RJIT 188 views
0 votes
1 answer
7
Given relations $R(w,x)$ and $S(y,z),$ the result of SELECT DISTINCT $w,x$ from $R,S$ $R$ has no duplicates and $S$ is non-empty $R$ and $S$ have no duplicates $S$ has no duplicates and $R$ is non-empty $R$ and $S$ has the same number of tuples
asked Apr 1 in Databases Lakshman Patel RJIT 149 views
0 votes
1 answer
8
Table employees has $10$ records. It has a non-NULL SALARY column which is also UNIQUE. The SQL statement SELECT COUNT(*) FROM EMPLOYEE WHERE SALARY > ALL (SELECT SALARY FROM EMPLOYEE); $10$ $9$ $5$ $0$
asked Apr 1 in Databases Lakshman Patel RJIT 202 views
0 votes
1 answer
9
Which type of Statement can execute parameterized queries? PreparedStatement ParameterizedStatement ParameterizedStatement and CallableStatement All kinds of Statements
asked Mar 31 in Databases Lakshman Patel RJIT 345 views
0 votes
1 answer
10
0 votes
1 answer
11
If an SQL query involves NOT,AND,OR with no parenthesis NOT will be evaluated first; AND will be evaluated second; OR will be evaluated last. NOT will be evaluated first; OR will be evaluated second; AND will be evaluated last. AND will be evaluated first; OR will be evaluated second;NOT will be evaluated last. The order of occurrence determines the order of evaluation.
asked Mar 30 in Databases Lakshman Patel RJIT 232 views
0 votes
3 answers
12
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(salary) from works S where T. company name = S. company name) The above ... salary of all employees all the companies. Find all employees who earn more than the average salary of all employees of their company.
asked Mar 24 in Databases jothee 279 views
0 votes
2 answers
13
Integrity constraints ensure that changes made to the database by authorized users do not result into loss of data consistency. Which of the following statement(s) is (are) true w.r.t.the examples of integrity constraints? An instructor Id. No. cannot be null, provided Instructor Id No. being primary ... b and c are true. a false, b and c are true. a and b are true; c false. a,b and c are false.
asked Mar 24 in Databases jothee 181 views
2 votes
4 answers
14
Properties of $\text{ DELETE'}$ and $\text{ TRUNCATE'}$ commands indicate that After the execution of $\text{ TRUNCATE'}$ operation, $\text{COMMIT}$, and $\text{ROLLBACK}$ statements cannot be performed to retrieve the lost data, while $\text{ DELETE'}$ allow it ... not allow it After the execution of $\text{ DELETE'}$ and $\text{ TRUNCATE'}$ operation no retrieval is possible for the lost data
asked Jan 13 in Databases Satbir 561 views
4 votes
4 answers
15
The SQL query SELECT columns FROM TableA RIGHT OUTER JOIN TableB ON A.columnName = B.columnName WHERE A.columnName IS NULL returns the following: All rows in Table $B$, which meets equality condition above and, none from Table $A$ which meets the condition. All rows ... condition. All rows in Table $B$, which meets the equality condition All rows in Table $A$, which meets the equality condition
asked Jan 13 in Databases Satbir 738 views
0 votes
1 answer
16
Given two tables EMPLOYEE (EID,ENAME,DEPTNO) DEPARTMENT(DEPTNO ,DEPTNAME) Find the most appropriate statement of the given query Select count(*) total from employee where DEPTNO IN (D1 ,D2) group by DEPTNO having count(*)>5 1)Total number of employees in each department D1 ... >5 3)Display total number of employees in both department D1 and D2 4)The output of the query must have at least two rows
asked Dec 20, 2019 in Databases Sanjay Sharma 588 views
0 votes
0 answers
17
The difference between the structured query language and the programming relationship language is that Structured query language does not contain answer to how ? about computation Programming language does not contain the answer to how?about computation Only structured query language uses strict semiotics Only programming language uses strict semiotics.
asked Aug 4, 2019 in Databases gatecse 37 views
1 vote
1 answer
18
Which of the following statements are DML statements? Update [tablename] Set [columnname]=VALUE Delete [tablename] Select * from [tablename] a and b a and d a, b and c b and c
asked Jul 2, 2019 in Databases Arjun 785 views
0 votes
1 answer
19
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) ... 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) ?
asked May 22, 2019 in Databases aditi19 611 views
1 vote
3 answers
20
Class(name, meets_at, room, fid) Faculty(fid, fname, deptid) Find the names of faculty members who teach in every room in which some class is taught
asked May 18, 2019 in Databases aditi19 287 views
0 votes
2 answers
21
Consider two $n \times 1$ vectors $u$ and $v$ , stored as table $U(\text{ind,val})$ and $V(\text{ind,val})$ with the same schema A row $(i,u_i)$ of table $U$ specifies the $i^{th}$ element of vector $u$ has value $u_i$ (similarly for $v$, ... $u + v$ of the two vectors $u$ and $v$. Explain your solution.
asked May 12, 2019 in Databases akash.dinkar12 346 views
...