English
Tamil Nadu Board of Secondary EducationHSC Science Class 12

Write few commands used by DBA to control the entire database.

Advertisements
Advertisements

Question

Write few commands used by DBA to control the entire database.

Answer in Brief
Advertisements

Solution

  1. USE Database-
    This command is used to select the database in MySQL for working.
    Syntax:
    mysql > use test;
    Database changed
    mysql>
  2. SHOW Databases-
    Lists all the databases available in the database server.
    Syntax:
    mysql > show databases;
  3. SHOW Tables-
    Lists all the tables available in the current database we are working in.
    Syntax:
    mysql > show tables;
  4. SHOW COLUMNS FROM tablename-
    Lists all the attributes, attribute type, Is Null value permitted, key information, default value and other information for the given table.
    Syntax:
    mysql > show columns from sports;
  5. SHOW INDEX FROM tablename-
    The query shows all the indexes for the given table.
    Syntax:
    mysql > show indexes from sports;
  6. SHOW TABLE STATUS LIKE tablename\G-
    This command provides with detailed report on the performance of the table.

shaalaa.com
Concepts of Structured Query Language (SQL)
  Is there an error in this question or solution?
Chapter 3: Introduction to Database Management System - Evaluation - PART – III [Page 83]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 12 TN Board
Chapter 3 Introduction to Database Management System
Evaluation - PART – III | Q 5. | Page 83
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×