SQL Server Interview Questions
Questions Answers Views Company eMail

hi friends please answer this question ASAP:- how to count the no. of employee in a each department or no. of employee in each location by using emp/dept table

Indecomm,

7 3656

write a query to remove duplicate records without using primary key column?

ABCO,

2 6557

What Is The Difference Between Primary Key & Super Key

Accenture,

3 4413




I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible

Wipro, HCL,

1148

Table - Products has number of products as below Productid ProductName 1 iPhone 2 iPad 3 BlackBerry Table - SalesPersonProduct has the below records Salespersonid productid S1 1 S1 2 S1 3 S2 1 S3 2 Write a SQL query that returns the number of sales for each product

2 4530

I have Two table First have UserName and second is address, in address table more than value relegated to UserName table, i want to fetch 2nd address if exist other wise 1st address access

4 3101

I have a table Events Events containing cardno,time,id,name- -each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible

918

what is Equity join?

ADP,

2 3885




How to get number of days in a given year?

ADP,

4 3716

Differencr Between DELETE and TRUNCATE?

ADP,

3 3987

DIFFERENCE BETWEEN SQL SERVER 2005 and 2008

ADP,

2 3076

How to get number of days in a given year?

ADP,

4 4704

Explain SELF JOIN ?

ADP,

3 3989

What is Index ? Explain its Types?

ADP,

2 4881

Define Foreign Key?

ADP, College School Exams Tests,

3 5535


Post New SQL Server Questions






Un-Answered Questions { SQL Server }

explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?

1316


Hi, I Created 3 Tables Person(PersID[prkey],Name,Email,Password), Project(ProjName,ProjID[prkey],ProjLeader,ProjManager) & ProjectInvolvement(EntryDate,ProjID[frkey],PersID[frkey],ProjDuration). For this how can i INSERT,UPDATE & DELETE Through PROCEDURE? Please Post the Answer for me. Desai.

700


I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that

710


How do use Having,Group by,Group function in SQL?

705


Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.

1387






SQL Server Architecture ?

1172


how to do partition in sqlserver

1344


How can we call UDF(User Define Function) using C# code in ASP.net ?

4760


hi i am working as a testengineer , so i want to no the backend data base connection can any one tell mwe in detail

1180


query processing

1039


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

1279


Which is the best place or learning center for MS SQL?????In Bangladesh?????

910


Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...

974


1.what are diff types of joins , and explain diff between cross join and full outer join 2.diff types of views 3. Diff types of index 4. What is diff b/w stores procedure and function procedure 5.diff between double and int in SQL 6.diff between char and varchar in SQL. 7.Oracle or SQL whice you will preferred and why.

392


How retrieve field names from the table in SQL through JAVA code?

741