ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
1. What are the grouping function in SQL ?

2. If base table of a view deleted means, what will happen
while we querying on view ? will give any error ?

3. Difference between DROP, DELETE, TRUNCATE table ?

4. What is constraints and types ?

5. What is max size of  nchar & nvarchar ?

6. Define  ROLLBACK, COMMIT, SAVE POINT 

7. How non-clustered better ?  or rank the Clustered,
Non-Clustered and Table scan in performance wise 

8. Select 10 rows from a table ?

9. Define DML, DDL, DCL, DTL commands ?

10. What is mean by NULL value ? NULL means "" or 0 or
undefined ?

11. Default constraints ?

12. Can we have more then primary Key in table ?

13. Type of integrity ?  Entity, Referential, Domain ?
 Question Submitted By :: Ramesh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?
Answer
# 1
What is the difference between DROP,DELETE,TRUNCATE table ?
Delete:It's an DML command which is used for deleting
particular table in the database...even though we delete the
data we can regain it by rollback command.

Example:SQL> SELECT COUNT(*) FROM emp;

  COUNT(*)
----------
        14

SQL> DELESQL> SELECT COUNT(*) FROM emp;

  COUNT(*)
----------
        14

SQL> DELETE FROM emp WHERE job = 'CLERK';

4 rows deleted.

SQL> COMMIT;

Commit complete.

Truncate:This command is a DDL Command which is used to
delete a table...I Just Conclude it as
Truncate=Delete+Commit...once u applied this on table u
can't get the data back...but the structure will be there..

Example:

SQL> TRUNCATE TABLE emp;

Table truncated.

SQL> SELECT COUNT(*) FROM emp;

  COUNT(*)
----------
         0

Drop:It is used to destroy entire structure of a
table...once we apply this command on any particular table
we can't get it in anyway...so be cautious while applying
this command.

Example:

SQL> DROP TABLE emp;

Table dropped.

SQL> SELECT * FROM emp;
SELECT * FROM emp
              *
ERROR at line 1:
ORA-00942: table or view does not exist
 
Is This Answer Correct ?    1 Yes 0 No
Srivas
 
  Re: 1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?
Answer
# 2
Select 10 rows from a table ?

  Answer : Use TOP keyword to select 10 rows from a table.
 
Is This Answer Correct ?    1 Yes 0 No
Srivas
 
 
 
  Re: 1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?
Answer
# 3
Can we have more then primary Key in table ?

  Answer : We can't use more than one Primary key in a  
           table because Primary key is Unique Value.
 
Is This Answer Correct ?    1 Yes 1 No
Srivas
 
  Re: 1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?
Answer
# 4
What is mean by NULL value ?NULL means "" or 0 or
undefined ?

   Answer : NULL means empty ie. ""
 
Is This Answer Correct ?    1 Yes 1 No
Srivas
 
  Re: 1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?
Answer
# 5
What are the grouping function in SQL ?

Grouping functions are: 
max()
min()
sum()
avg()

Select 10 rows from a table ?
select * from table_name where count(*) <=10
or

select top 10 from table _name

10. What is mean by NULL value ? NULL means "" or 0 or
undefined ?

Null is not equal to "" or 0. it is un identified value

12. Can we have more then primary Key in table ?
no, we can't.

2. If base table of a view deleted means, what will happen
while we querying on view ? will give any error ?

i dont know exactly. but it likely base table doesnt exists.

4. What is constraints and types ?
types:
primary key
foreign key
not null
unique
defaults
check
rule
 
Is This Answer Correct ?    0 Yes 1 No
Laxman
 
  Re: 1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?
Answer
# 6
10) Null is not equal to "" or 0. it is un identified value
means suppose there is column Phone number.
If we do not any phone number we can insert NULL.
"" means empty String.
Select * from table where roll=""(EMPTY)
select * from table where roll is NULL(UNDEFINED)

2) Correct Answer.
View is made up of base tables. Suppose we select data from 
two table table1 & table2 ,these are base tables.
He wants to ask u if we drop a table table2,Will view give 
error.
  Yes.But if we recreate the table we can query the view 
again.

Try it by urself--
First create the view by selecting the data from two tables 
then select columns from view
Suppose select * from view1
then drop one of the tables 
then select * from view1 gives error.


12) NO.


13) ENTITY INTEGRITY--We cannit insert null in  a parimary 
key. CZ if two columns have tha value we cannot distinguish 
b/w two rows.

REFERENTIAL INTEGRITY---Vales in foregn key table are only 
those that match a value in a primary key table.

DOMAIN CONSTRAINT--A unique value for a column.
Exampl--Empid
 
Is This Answer Correct ?    0 Yes 0 No
Sonia
 
  Re: 1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?
Answer
# 7
RollBack Mean Transaction is Rolled Back to That State me 
undo The Thing That we Have Done

Commit Mean Transaction is Commited to that state me the 
the thing we have done is save

SavePoint is Concept of ORacle mean
For A Long Transaction we have Declare save point 
intermediate so that the transction before savepoint is 
commited .
 
Is This Answer Correct ?    1 Yes 0 No
Dinesh Sharma
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
How do you troubleshoot SQL Server if its running very slow?  2
what is the cursor life span? Evalueserve5
How do you measure the performance of a stored procedure? Infosys1
What is blocking and how would you troubleshoot it?  1
What does the INSTEAD OF trigger do?  2
What are user defined datatypes and when you should go for them?  1
Which system tables contain information on privileges granted and privileges obtained  1
What are the all different types of Joins in SQL Server 2000, Anybody can explain each join with definition..Thanks in advance.... Siemens6
what is web server? Satyam3
What is an extended Stored Procedure?  1
What is a Stored Procedure?  5
how to rest identity columns in sql server Matrix2
create procedure proc1 (@a int) as begin if @a=1 create table #temp(a1 int) else create table #temp(a1 int) end while executeing the above code it shows error like '#temp already exist' .why it shows an error? IBM1
What are the two virtual tables SQL Server maintains for triggers?  2
wat will be the sql query to extract only last 3 records from table supose table hving thousands for records  13
PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or more PCs. APX1
About types of indexes in SQL server ? Cognizent1
What is the appropriate number of test cases that you can write on a database? Microsoft1
is there more the two primary key in a single table? Systematix19
I need a query that retrieves info from an Oracle table and a query that retrieves info from a SQL Server table. The info has to be joined together according to Record ID numbers. I have very limited access to the Oracle database but full control of the SQL Server database.How do I join two different queries from two different databases?  1
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com