search
Log In

Recent questions tagged sql

1 vote
2 answers
1
The relation scheme given below is used to store information about the employees of a company, where $\textsf{empId}$ is the key and $\textsf{deptId}$ indicates the department to which the employee is assigned. Each employee is assigned to exactly ... than the average salary of employees in the department employees in the company female employees in the department female employees in the company
asked Feb 18 in Databases Arjun 415 views
1 vote
1 answer
2
A relation $r(A, B)$ in a relational database has $1200$ tuples. The attribute $A$ has integer values ranging from $6$ to $20$, and the attribute $B$ has integer values ranging from $1$ to $20$. Assume that the attributes $A$ and $B$ are independently distributed. The estimated number of tuples in the output of $\sigma _{(A>10)\vee(B=18)}(r)$ is ____________.
asked Feb 18 in Databases Arjun 1.3k 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) ... 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, 2020 in Databases jothee 168 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 ... $II$ are false Statement $I$ is correct but Statement $II$ is false Statement $I$ is incorrect but Statement $II$ is true
asked Nov 20, 2020 in Databases jothee 140 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), ... 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, 2020 in Databases jothee 93 views
0 votes
1 answer
6
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, 2020 in Databases jothee 91 views
0 votes
1 answer
7
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, 2020 in Databases jothee 86 views
1 vote
1 answer
8
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, 2020 in Databases Lakshman Patel RJIT 227 views
0 votes
2 answers
9
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, 2020 in Databases Lakshman Patel RJIT 213 views
0 votes
1 answer
10
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, 2020 in Databases Lakshman Patel RJIT 237 views
0 votes
1 answer
11
Which type of Statement can execute parameterized queries? PreparedStatement ParameterizedStatement ParameterizedStatement and CallableStatement All kinds of Statements
asked Mar 31, 2020 in Databases Lakshman Patel RJIT 590 views
0 votes
1 answer
12
0 votes
1 answer
13
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, 2020 in Databases Lakshman Patel RJIT 345 views
0 votes
3 answers
14
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, 2020 in Databases jothee 377 views
0 votes
2 answers
15
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, 2020 in Databases jothee 231 views
2 votes
4 answers
16
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, 2020 in Databases Satbir 848 views
4 votes
4 answers
17
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, 2020 in Databases Satbir 883 views
0 votes
1 answer
18
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 719 views
0 votes
0 answers
19
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 52 views
...