Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Saturday, 10 January 2015


What are joins?Sometimes we have to select data from two or more tables to make our result complete. We have to perform a join.

How many types of Joins?Joins can be categorized as:
Inner joins (the typical join operation, which uses some comparison operator like = or <>). These include equi-joins and natural joins.
Inner joins use a comparison operator to match rows from two tables based on the values in common columns from each table. For example, retrieving all rows where the student identification number is the same in both the students and courses tables.
Outer joins. Outer joins can be a left, a right, or full outer join.
Outer joins are specified with one of the following sets of keywords when they are specified in the FROM clause:

Transact-SQL Optimization Tips

Use views and stored procedures instead of heavy-duty queries.
This can reduce network traffic, because your client will send to server only stored procedure or view name (perhaps with some parameters) instead of large heavy-duty queries text. This can be used to facilitate permission management also, because you can restrict user access to table columns they should not see.

Sunday, 7 July 2013

SQL QUESTIONS

1) What is RDBMS?
2) What are the Properties of the Relational Tables?
3) What is Normalization?
4) What is De-normalization?
5) How is ACID property related to Database?
6) What are the Different Normalization Forms?
7) What is a Stored Procedure?
8) What is a Trigger?
9) What are the Different Types of Triggers?
10) What is a View?
11) What is an Index?
12) What is a Linked Server?
13) What is a Cursor?
14) What is Collation?
15) What is the Difference between a Function and a Stored Procedure?

GUID datasize


GUID datasize?          

 128bit

Difference between char and nvarchar / char and varchar data-type

Difference between char and nvarchar / char and varchar data-type?
  
char[(n)] : Fixed-length non-Unicode character data with length of n bytes. n must be a value from 1 through 8,000. Storage size is n bytes. The SQL-92 synonym for char is character.

nvarchar(n) :Variable-length Unicode character data of n characters. n must be a value from 1 through 4,000. Storage size, in bytes, is two times the number of characters entered. The data entered can be 0 characters in length. The SQL-92 synonyms for nvarchar are national char varying and national character varying.
 varchar[(n)] :Variable-length non-Unicode character data with length of n bytes. n must be a value from 1 through 8,000. Storage size is the actual length in bytes of the data entered, not n bytes. The data entered can be 0 characters in length. The SQL-92 synonyms for varchar are char varying or character varying.

Popular Posts