MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

SQL

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The SQL command which sets conditions for the rows or columns to be shown in the query output
A
WHERE
B
SELECT
C
FROM
D
WHEN
Explanation: 

Detailed explanation-1: -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-2: -A select statement retrieves zero or more rows from one or more database tables or database views. The asterisk (*) is used to denote that all columns in a table should be displayed as part of the output.

Detailed explanation-3: -SHOW COLUMNS displays information about the columns in a given table. It also works for views.

Detailed explanation-4: -You can get the MySQL table columns data type with the help of “information schema. columns”. SELECT DATA TYPE from INFORMATION SCHEMA. COLUMNS where table schema = ‘yourDatabaseName’ and table name = ‘yourTableName’.

There is 1 question to complete.