Category: Database

Posted on: January 18, 2025 Posted by: rahulgite Comments: 0

SQL Queries for Interview

Q1. Write a query to fetch the EmpFname from the EmployeeInfo table in the upper case and use the alias name as EmpName. Q2. Write a query to fetch the number of employees working in the department ‘HR’. Q3. Write a query to get the current date. Q4. Write a query to retrieve the first four characters of EmpLname from the EmployeeInfo table. Q5. Write a query to fetch only…

Posted on: January 18, 2025 Posted by: rahulgite Comments: 0

Differences Between Views and Stored Procedures

Aspect Views Stored Procedures Parameters Does not accept parameters. Accepts parameters. Building Block Can be used as a building block in larger queries. Cannot be used as a building block in larger queries. Content Contains only a single SELECT query. Can contain multiple statements like IF, ELSE, LOOP, etc. Modification Cannot perform modifications to any table. Can perform modifications to one or more tables. Query Target Can sometimes be used…