Sql Server Interview Questions and Answers

1) SQL Server query to split the Field into 2 Column. This query the developer can use when the name consists of numeric value like Ram1, Ram2 SELECT Left(Lastname, 3) As characters, Right(Lastname, 1) As numbers         FROM   [Amatya].[dbo].[tblUsers] Note – First 3 Character will be… Continue reading

Top Sql Server Interview Questions and their Answers

1)  How to create an empty table emp1 with same structure as emp?  Create table emp1 as select * from emp where 1=2; 2)  How to find the Max Salary from each department? Select D.DepName, MAX(E.Salary) as Salary from tbl_Emp E        Inner Join tbl_Department D on E.Fk_DepId… Continue reading

What is a "locale"?

A locale is a description of certain conventions your program might be expected to follow under certain circumstances. It’s mostly helpful to internationalize your program. If you were going to print an amount of money, would you always use a dollar sign? Not if your program was going to run… Continue reading

How do I determine whether a character is numeric, alphabetic, and so on?

The header file ctype.h defines various functions for determining what class a character belongs to. These consist of the following functions: Function Character Class Returns Nonzero for Characters isdigit() – Decimal digits – 0-9 isxdigit() – Hexadecimal digits – 0-9, a-f, or A-F isalnum() – Alphanumerics – 0-9, a-z, or… Continue reading

What is the difference between a free-standing and a hosted environment?

Not all C programmers write database management systems and word processors. Some write code for embedded systems, such as anti-lock braking systems and intelligent toasters. Embedded systems don’t necessarily have any sort of file system, or much of an operating system at all. The ANSI/ISO standard calls these “free-standing” systems,… Continue reading

What header files do I need in order to define the standard library functions I use?

The funny thing is, these are not necessarily the files that define what you’re looking for. Your compiler guarantees that (for example) if you want the EDOM macro, you can get it by including <errno.h>. EDOM might be defined in <errno.h>, or <errno.h> might just include something that defines it…. Continue reading

Why should I use standard library functions instead of writing my own?

The standard library functions have three advantages: they work, they’re efficient, and they’re portable. They work: Your compiler vendor probably got them right. More important, the vendor is likely to have done a thorough test to prove they’re right, more thorough than you probably have time for. (There are expensive… Continue reading