what is the use of select hint in sql server? why they use?

Posted by amanueljoseph-9523 under Sql Server on 11/17/2012 | Points: 10 | Views : 829 | Status : [Member] | Replies : 1

what is the use of select hint in sql server? why they use? can you give example


Posted by: Rajeshk on: 11/17/2012 [Member] Starter | Points: 25

hi amanueljoseph,

Databases store data for later retrieval. Do you know how that is achieved? It's the SELECT SQL command that does the job.
That's what it's all about, retrieving data from the database tables. It's part of the data manipulation language that is responsible for query the data from the database.

An SQL SELECT Example:

The "Persons" table:

P_Id LastName FirstName Address City
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

Now we want to select the content of the columns named "LastName" and "FirstName" from the table above.

We use the following SELECT statement:

SELECT LastName,FirstName FROM Persons
The result-set will look like this:

LastName FirstName
Hansen Ola
Svendson Tove
Pettersen Kari

For more Refer these links


amanueljoseph-9523, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response