asp.net.ph

Skip Navigation LinksHome > Data Access / ADO.NET > Structured Query Language (SQL) Basics > SQL Basic Concepts

SQL Basic Concepts


SQL is a database inquiry and programming language.

We use SQL to define statements ( or SQL commands ) to perform a specified action, which may involve selecting, inserting, updating, or deleting data from a data source.

The minimum required SQL syntax for selecting data is:

SELECT * FROM tableName

which SELECTs all rows and columns FROM a given table.

The FROM clause in a SELECT statement can have an expression that identifies one or more tables from which data is retrieved.

The FROM expression can be a single table name, a view or saved query name, or a compound resulting from a join of one or more tables.

For now, we focus on selecting data from a single table.

The SQL SELECT statement can include optional clauses with arguments to set the criteria that the action will carry out.

SELECT column1, column2 FROM tableName
   WHERE columnName = value
   GROUP BY columnName
   ORDER BY columnName

NOTE: An SQL statement must be written as a single line without any line breaks; the examples shown here and in the following sections are done so only for readability.

Handling Postbacks from Multiple Item Commands
Run Sample | View Source

When the query is run, the configured ADO.NET provider searches the specified table or tables, extracts the chosen columns, selects rows that meet the criterion, and sorts or groups the resulting rows into the order specified.

See Also

SQL SELECT: Specifying Data To Include In Query Results



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note