Add office photos
Employer?
Claim Account for FREE

Citibank

3.9
based on 1.5k Reviews
Filter interviews by

10+ Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. 6. What is difference between procedure and function

Ans.

Procedure is a set of instructions that performs a specific task, while function returns a value after performing a task.

  • Procedure does not return a value, while function does.

  • Functions can be called from within expressions, while procedures cannot.

  • Functions can have parameters passed to them, while procedures can have both parameters and arguments.

  • Examples of procedures include printing to the console, while examples of functions include calculating a sum or finding the leng...read more

Add your answer

Q2. 10. What is difference between soft link and hard link

Ans.

Soft links are pointers to the original file while hard links are additional names for the same file.

  • Soft links are created using the 'ln -s' command while hard links are created using the 'ln' command.

  • Soft links can point to files on different file systems while hard links cannot.

  • Deleting the original file will render a soft link useless while a hard link will still work.

  • Soft links have different inode numbers while hard links have the same inode number as the original file.

Add your answer

Q3. 2. How to replace male with female in Oracle

Ans.

To replace male with female in Oracle, use the UPDATE statement with the SET clause.

  • Use the UPDATE statement with the SET clause to replace male with female in Oracle

  • Example: UPDATE employees SET gender='female' WHERE gender='male'

  • Make sure to specify the table name and column name correctly

  • Use WHERE clause to specify the condition for replacement

Add your answer

Q4. 4.what is difference between delete and truncate

Ans.

Delete removes specific rows while truncate removes all rows from a table.

  • Delete is a DML command while truncate is a DDL command.

  • Delete is slower than truncate as it logs each row deletion while truncate does not.

  • Delete can be rolled back while truncate cannot be rolled back.

  • Delete can have a WHERE clause to specify which rows to delete while truncate removes all rows.

  • Delete does not reset the identity of the table while truncate resets the identity of the table.

Add your answer
Discover null interview dos and don'ts from real experiences

Q5. 8. Write command to replace Sam with vam on 5th line

Ans.

Command to replace Sam with vam on 5th line

  • sed '5s/Sam/vam/' filename.txt

  • awk 'NR==5 {sub(/Sam/, "vam")} 1' filename.txt

Add your answer

Q6. 5.what is cursor and explain type of cursor

Ans.

A cursor is a database object used to manipulate data in a result set.

  • A cursor is used to traverse through a result set one row at a time.

  • There are two types of cursors: static and dynamic.

  • Static cursors are read-only and scroll forward only.

  • Dynamic cursors are updatable and can scroll in any direction.

  • Cursors can be used in stored procedures, triggers, and functions.

Add your answer

Q7. 11. write command to display biggest file on server

Ans.

Use the 'du' command to display biggest file on server.

  • Open terminal or SSH into server

  • Navigate to directory to search from

  • Run 'du -a . | sort -n -r | head -n 1' command

  • The output will display the biggest file on the server

Add your answer

Q8. 3.write to query to display 3rd highest salary

Ans.

Query to display 3rd highest salary

  • Use the ORDER BY clause to sort the salaries in descending order

  • Use the LIMIT clause to limit the result to the third row

  • Use a subquery to exclude the top two salaries

Add your answer

Q9. 7.write command to display secod last line of file

Ans.

Display second last line of a file using command line.

  • Use the tail command with -n option to display last two lines of the file.

  • Then use head command with -n option to display the second last line.

  • Example: tail -n 2 file.txt | head -n 1

Add your answer

Q10. 9. Write command to display blank line in file

Ans.

Command to display blank line in file

  • Use echo command with empty quotes to create a blank line in a file

  • Syntax: echo '' >> filename

  • Alternatively, use printf command with newline character

  • Syntax: printf ' ' >> filename

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Officer Interview Questions from Similar Companies

4.0
 • 14 Interview Questions
4.1
 • 13 Interview Questions
3.8
 • 11 Interview Questions
3.8
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter