Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

SQL SELECT statement


The SQL SELECT statement returns a result set of records from one or more tables.

Select statement is used to retrieve records from RDBMS Database one or more tables.


SELECT column_name1,column_name2..column n
FROM table_name

Practical example with web application:

Example with multiple tables:

SELECT TITLE,UserName,[Description]
FROM designation D
INNER JOIN UserProfile U on U.UserId=D.Employee

What is SQL?

What is SQL?

SQL is a simple programming language designed for accessing and manipulating RDBMS databases (MS-SQL server, Oracle,   MySql etc).
SQL is ANSI (American national standards institute) standard language.
SQL stands for Structured Query Language.

There are 5 types of SQL statements

DRL (data retrieval language )
DDL(data definition language)
DML(data manipulation language)
DCL(data control language)
TCL(transaction control language)


SQL use:

The Data in RDBS (Relational Database Management System) is stored in objects called tables.

A table is a collection of related data entries and it consists of columns and rows.

1.  Using SQL you can create (ADD), DROP (Remove) table tables
2.   Using SQL you can create Database, Delete Database.
3.  Using SQL you can Insert, Update, and Delete data (records) in table, and these
4.  Operations also known as CRUD operation.
5.  SQL can create stored procedures in a database
6.  SQL can create views in a database
7.  SQL can set permissions on tables, procedures, and views


SELECT TITLE,Employee,[Description] from designation