Wednesday, 11 January 2017

SQL Select Statement.?

The SELECT Statement is used to fetch the data from Database.

Select statement is used to select data from database.
The Result is stored in a Result Table, called Result-Set.

SQL Select Statement
SELECT ColumnName1, ColoumnName1 From  TableName;
OR
Select  *  from TableName ;

Example:=-
                  Table Name -  Student
id               Name         Age         Gender
 1                Ram            15              Male
 2                Bob             18             Male
 3                julie            18            Female
4                  john           22              Male


Write Query:-  Select * from Student;
OutPut 
 id               Name         Age         Gender
 1                Ram            15              Male
 2                Bob             18             Male
 3                julie            18            Female
4                  john           22              Male

 Write Query:- Select id, Name, Age From Student Where id= 1;
Output
 id               Name         Age        
 1                Ram            15         



No comments:

NOCOUNT In SQL Server This Statement is used to stop the message that shows the count of the number of rows affected by the SQL statement...