Pages

Friday, November 30, 2012

DOT NET Interview Questions


       In which event are the controls fully loaded?
Page load event guarantees that all controls are fully loaded. Controls are also accessed in Page_Init events but you will see that view state is not fully loaded during this event.

How can we identify that the Page is Post Back?
Page object has an "IsPostBack" property, which can be checked to know that is the page posted back.

What is the lifespan for items stored in ViewState?
The items stored in ViewState live until the lifetime of the current page expires including the postbacks to the same page.

How information about the user's locale can be accessed?
The information regarding a user's locale can be accessed by using the System.Web.UI.Page.Cultureproperty.

Thursday, November 29, 2012

SQL INTERVIEW QUESTIONS

Q: What does the acronym SQL stand for?
Ans: STRUCTURED QUERY LANGUAGE

Q: What are the six main categories of SQL commands?
Ans:
Data definition language
Data Manipulation language
Data Query Language
Data Control Language
Data administration commands
Transactional control commands

Q: What are the four transactional control commands?
Ans:
Commit
Rollback
SAVE POINT
SET TRANSACTION

Q: Identify the categories in which the following SQL commands fall:
Ans:
1. CREATE TABLE =DDL
2. DELETE =DML
3.SELECT=DQL
4.INSERT=DML
5. ALTER TABLE=DCL
6. UPDATE=DML

Q:What is a database Schema?
Ans:
A database Schema is a set of interrelated database objects which are owned by a group or person.

Q: Difference between Unique and Primary Key?
Ans:
No two columns in a table can have a Primary Key
Two Columns can have a Unique Key in a table

Primary Key is referenced to Join Tables
Unique Key cannot be referenced

Unique Key can be Null
Primary Key is not Null

For Normalization use

http://programmerschoice.blogspot.in/2012/01/normalizing-database.html

Q
Write DML to accomplish the following:
a. Correct Billy Pierce's SSN to read 310239857.
UPDATE `emp_new` SET ssn =310239857 WHERE ssn =310239856
b. Add Ben Moore, PHONE is 317-5649880, ssn is 313456789.
INSERT INTO emp_new VALUES ('Moore', 'Ben', 313456789, 3175649880)
c. John Smith quit; remove his record.
DELETE FROM emp_new WHERE `FIRST_NAME` = 'JOHN' AND `LAST_NAME` = 'SMITH'