HI WELCOME TO SIRIS

Select statement - Part 10

Leave a Comment
Basic select statement syntax
SELECT Column_List
FROM Table_Name

If you want to select all the columns, you can also use *. For better performance use the column list, instead of using *.
SELECT *
FROM Table_Name

To Select distinct rows use DISTINCT keyword
SELECT DISTINCT Column_List
FROM Table_Name

ExampleSelect distinct city from tblPerson

Filtering rows with WHERE clause
SELECT Column_List
FROM Table_Name
WHERE Filter_Condition

Example: Select Name, Email from tblPerson where City = 'London'


Note: Text values, should be present in single quotes, but not required for numeric values.

Different operators that can be used in a where clause

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.