Others Interview Questions and Answers (265) - Page 13

DB2 - Display the employee details who are working from more than 1 and half year

SELECT * FROM EMPLOYEES WHERE DAYS (CURRENT_DATE)-DAYS (HIRE_DATE) >548

(OR)

SELECT * FROM EMPLOYEES WHERE HIRE_DATE < (CURRENT_DATE - 1 YEARS - 6 MONTHS)
What will be the output of below query in MYSQL? Select current_timestamp as 'Current date'; Select curdate() as 'Current date';

Both will produce the same Date but

current_timestamp will produce Current date along-with current time and

curdate will produce Current date only no time.

After executing above query,below output will be displayed.

2013-12-04 15:20:38.833
2013-12-04


There is difference between both in MYSql.
What is difference among Getdate(),Sysdate and Curdate().

All are in-built functions and produce Current Date.But they are used in different Databases.

1). Getdate() is used in SQL-Server.
2). Sysdate() is used in Oracle and,
3). Curdate() is used in MySql.
How to Concate rows with comma-separeted in MySQL?

With the help of Group_Concat in-built MySQL function,we can append rows values with Comma.

For Example:-

Select Group_Concat(employee_name) from employee_master;
Select ifnull(10,20) What will be the output?

Output will be 10. Actually IfNull works same as IsNull.But Both functions are in different DB as IsNull is in Sql-Server,but IfNull is in MYSql DB.

IfNull returns 1st expression value if the 1st expression value is not null otherwise it returns 2nd expression value.
Here,1st expression value is not null i.e. it's 10 so ifnull will return 10.
What is WebDriver?

It is testing framework for developing complex user scenarios and running them in an automated fashion in your Web site and browser.

It is emerging standard through which Web developers can write tests to automate Web browsers to test their sites.
Which tests make sure that the new code does not break the existing code?

NOTE: This is objective type question, Please click question title for correct answer.
SELECT SUBSTR ('123456789', INSTR('abcabcabc','b'), 4) FROM EMPLOYEE; prints ? What is the output of above SQL in ORACLE?

NOTE: This is objective type question, Please click question title for correct answer.
Which is the subset of SQL commands used to manipulate Oracle Database Structures, including tables?

NOTE: This is objective type question, Please click question title for correct answer.
Which of the following is TRUE for the System Variable $date$? + Oracle

NOTE: This is objective type question, Please click question title for correct answer.
Which character function can be used to return a specified portion of a character string? + Oracle

NOTE: This is objective type question, Please click question title for correct answer.
In SQL, the CREATE TABLESPACE is used ?

NOTE: This is objective type question, Please click question title for correct answer.
In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and GRANT statements in a single transaction?

NOTE: This is objective type question, Please click question title for correct answer.
What is a device?

A device is any peripheral such as a graphics display, disk driver, terminal, or printer. It is a piece of hardware that we can connect to the computer system for manipulation by sending commands and data.
Classify devices with Examples

Three Classes of Device

A) Character Devices
Eg: Key board, mouse, monitor, printer, Tape, etc.

B) Block Devices
Eg: CD-ROM, floppy, Hard disk, etc.

C) Network Interfaces
Eg: Ethernet card, etc.
Found this useful, bookmark this page to the blog or social networking websites. Page copy protected against web site content infringement by Copyscape

 Interview Questions and Answers Categories