You are on page 1of 4

Q.1.History of SQL Server ? In 1988, Microsoft released its first version of SQL Server.

It was designed for the OS/2 platform and was developed jointly by Microsoft and Sybase. During the early 1990s, Microsoft began to develop a new version of SQL Server for the NT platform. While it was under development, Microsoft decided that SQL Server should be tightly coupled with the NT operating system. In 1992, Microsoft assumed core responsibility for the future of SQL Server for NT. In 1993, Windows NT 3.1 and SQL Server 4.2 for NT were released. Microsoft's philosophy of combining a high-performance database with an easy-to-use interface proved to be very successful. Microsoft quickly became the second most popular vendor of high-end relational database software. In 1994, Microsoft and Sybase formally ended their partnership. In 1995, Microsoft released version 6.0 of SQL Server. This release was a major rewrite of SQL Server's core technology. Version 6.0 substantially improved performance, provided built-in replication, and delivered centralized administration. In 1996, Microsoft released version 6.5 of SQL Server. This version brought significant enhancements to the existing technology and provided several new features. In 1997, Microsoft released version 6.5 Enterprise Edition. In 1998, Microsoft released version 7.0 of SQL Server, which was a complete rewrite of the database engine. In 2000, Microsoft released SQL Server 2000. SQL Server version 2000 is Microsoft's most significant release of SQL Server to date. This version further builds upon the SQL Server 7.0 framework. According to the SQL Server development team, the changes to the database engine are designed to provide an architecture that will last for the next 10 years. Q.2.DATA TYPES In Microsoft SQL Server, each column, local variable, expression, and parameter has a related data type, which is an attribute that specifies the type of data (integer, character, money, and so on) that the object can hold. SQL Server supplies a set of system data types that define all of the types of data that can be used with SQL Server. The set of system-supplied data types is shown below. Arithmetic operators Here are the most common arithmetic operators

*, / and % will be performed before + or - in any expression. Brackets can be used to force a different order of evaluation to this. Where division is performed between two integers, the result will be an integer, with remainder discarded. Modulo reduction is only meaningful between integers. If a program is ever required to divide a number by zero, this will cause an error, usually causing the program to crash. Q.3. Date Function ? In Oracle/PLSQL, the to_date function converts a string to a date. The syntax for the to_date function is: to_date( string1, [ format_mask ], [ nls_language ] ) string1 is the string that will be converted to a date. format_mask is optional. This is the format that will be used to convert string1 to a date. nls_language is optional. This is the nls language used to convert string1 to a date. Q.4.JOIN ? The JOIN keyword is used in an SQL statement to query data from two or more tables, based on a relationship between certain columns in these tables. Tables in a database are often related to each other with keys. A primary key is a column (or a combination of columns) with a unique value for each row. Each primary key value must be unique within the table. The purpose is to bind data together, across tables, without repeating all of the data in every table.

Different SQL JOINs Before we continue with examples, we will list the types of JOIN you can use, and the differences between them.

JOIN: Return rows when there is at least one match in both tables LEFT JOIN: Return all rows from the left table, even if there are no matches in the right table RIGHT JOIN: Return all rows from the right table, even if there are no matches in the left table FULL JOIN: Return rows when there is a match in one of the tables

Q.5.What is Integrity? Integrity is the quality of having high moral principles, being reliable and trustworthy. In databases integrity relates to the reliability and consistency of the data. The SQL DDL includes commands for specifying integrity constraints that the data stored in the database must satisfy. Updates that violate integrity constraints are disallowed. ...it is also being sincere and being trustworthiness nothing can guarantee social stability and confidence among people like honest, it is considered one of the basic foundations on which societies are built. the moment it disappears, distrust and lack of cooperation take it's place in the heart of people. Q.6. Default ? This term is used to describe a preset value for some option in a computer program. It is the value used when a setting has not been specified by the user. For example, the default font setting in Netscape Communicator is "Times." If you don't go to the Netscape preferences and change it to something else, the "Times" font will be used -- by default. Typically, default settings are set to what most people would choose anyway, so there's often no reason to change them. However, if you're one of those people who has to customize everything that you possibly can, then you can go ahead and change all the default settings you want.

"Default" can also be used as a verb. If a custom setting won't work for some reason, the program will "default" to the default setting. For example, say you're working on computer that is on a network and you print something when there is no printer specified. If you're lucky and don't get some nasty error message, the print job will default to the default printer and your work will be printed. Q.7. What are triggers? Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table. In SQL Server 6.5 you could define only 3 triggers per table, one for INSERT, one for UPDATE and one for DELETE. From SQL Server 7.0 onwards, this restriction is gone, and you could create multiple triggers per each action. But in 7.0 theres no way to control the order in which the triggers fire. In SQL Server 2000 you could specify which trigger fires first or fires last using sp_settriggerorder Triggers cant be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined. Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster. Till SQL Server 7.0, triggers fire only after the data modification operation happens. So in a way, they are called post triggers. But in SQL Server 2000 you could create pre triggers also. Refer SQL Server 2000 books online for triggers.