Database-MySQL [3i Infotech Placement]: Sample Questions 134 - 135 of 162

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 134

Edit

Describe in Detail

Essay▾

What is the use of DESC in SQL?

Explanation

  • DESC is the explicit keyword used in ORDER BY to make the order descending.
  • DESC has two purposes.
    • Describes a schema.
    • Retrieves rows from table in descending order.
  • The query SELECT ⚹ FROM EMP ORDER BY ENAME DESC will display the output sorted on ENAME in descending order.

Syntax:

DESC table_name

  • DESC in the above brings out following information:
    • Column name
    • Weather the column allows NULL or not NULL.
    • Datatype of the column
    • Database size precision and on NUMERIC data- the datatype scale.

Question 135

Edit

Describe in Detail

Essay▾

What is a query?

Explanation

Understanding of Query Languages
  • A query is a request for data or information from a database table or combination of tables.
  • This data may be generated as results returned by Structured Query Language or as pictorials, graphs or complex results, e. g. , trend analyses from data-mining tools.
  • Query languages generates different data types according to function.
  • For example, SQL returns data in neat rows and columns and is very similar to Microsoft Excel in appearance.
  • Other query languages generate data as graphs or other complex data manipulations, e. g. , data mining, which is the deep analysis of information for unknown trends and relationships.

Developed by: