COMPUTER SCIENCE AND ENGINEERING
SQL
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
1 record from the “students” table
|
|
all the records in the “students” table
|
|
first 10 records of “students” table
|
|
all the boys in the table “students"
|
Detailed explanation-1: -A special character asterisk * is used to address all the data(belonging to all columns) in a query. SELECT statement uses * character to retrieve all records from a table, for all the columns. The above query will show all the records of student table, that means it will show complete dataset of the table.
Detailed explanation-2: -SELECT * FROM <TableName>; This SQL query will select all columns and all rows from the table. For example: SELECT * FROM [Person].
Detailed explanation-3: -SELECT statements An SQL SELECT statement retrieves records from a database table according to clauses (for example, FROM and WHERE ) that specify criteria. The syntax is: SELECT column1, column2 FROM table1, table2 WHERE column2=’value’;
Detailed explanation-4: -The SELECT statement is used to select data from a database. The data returned is stored in a result table, called the result-set.