☞ Following are the topics to be covered :
1. Fetching specific record from a table. 2. Fetching all records with all the attributes. 3. Fetching all records with particular attributes. 4. Aliasing
☞ It is used to fetch records/rows/tuples from a table.
☞ It is used to retrieve a subset of rows or columns from one or more tables present in a database.
☞ To fetch the record from a table, we use the SELECT command.
☞ To fetch specific record, WHERE clause is used.
☞ Syntax :
☞ Example :
☞ To fetch all records with all the fields from a table, we use the SELECT command.
☞ To select all the columns from a table, the asterisk (*) can be used.
☞ Syntax :
☞ Example :
☞ To fetch all records with particular fields from a table, we use the SELECT command.
☞ Syntax :
☞ Example :
☞ It refers to giving a table, column, or expression a temporary or alternative name that can be used in SQL queries.
☞ Syntax :
☞ Example :