logo
  • Home
  • About
  • Training
  • Programming
  • CS
  • IT
  • IS
  • ECE
  • EEE
  • EE
  • Civil
  • Mechanical
  • Chemical
  • Metallurgy
  • Instrumentation
  • Aeronautical
  • Aerospace
  • Biotechnology
  • Agriculture
  • MCA
  • BCA
  • Internship
  • Contact

MySQL Database Multiple Choice Questions | MCQs | Quiz

MySQL Database Interview Questions and Answers
Pratice MySQL Database questions and answers for interviews, campus placements, online tests, aptitude tests, quizzes and competitive exams.

Get Started

•   Database Terminology
•   MySQL Setup - 1
•   MySQL Setup - 2
•   MySQL Interaction
•   Server SQL Mode
•   MySQL Identifier Syntax
•   Case Sensitivity
•   Character Set Support
•   Dropping Databases
•   Indexing & Altering Tables
•   Database Metadata
•   Table Retrievals - Joins
•   Table Retrievals-Subqueries
•   Table Retrievals - Union
•   Using Views
•   Table Deletes & Updates
•   Performing Transactions
•   Foreign Keys
•   Full Text Searches
•   MySQL Command Line Tool
•   Table Creation
•   Modifying Tables - 1
•   Modifying Tables - 2
•   Modifying Tables - 3
•   Data Value Categories - 1
•   Data Value Categories - 2
•   MySQL Datatypes - 1
•   MySQL Datatypes - 2
•   MySQL Datatypes - 3
•   MySQL Datatypes - 4
•   MySQL Datatypes - 5
•   Handling Invalid Data Values
•   Sequences Working
•   Expression Evaluation
•   Choosing Data Types
•   Statement Delimiters
•   Stored Functions
•   Triggers
•   Events
•   Views Security
•   Using Indexing
•   MySQL Query Optimizer
•   Efficient Queries
•   Loading Data Efficiently
•   Scheduling & Locking Issue
•   Administrative Optimization
•   If Good Statements Go Bad
•   Query Mechanics
•   Query Clauses
•   MySQL Programs
•   MySQL APIs
•   API Choosing
•   Compiling Client Programs
•   Server Connections
•   Handling Errors
•   Processing SQL Statement
•   Writing Clients-SSL Support
•   Embedded Server Library
•   Statements Execution
•   Server Side Statements
•   Perl Script Characteristics
•   Perl DBI Overview - 1
•   Perl DBI Overview - 2
•   Perl DBI - Work
•   Perl DBI-Web Applications
•   PHP Overview
•   PHP - Work
•   MySQL Components
•   MySQL Administration
•   Access Control & Security
•   Backups & Replication
•   Data Directory Location
•   Data Directory Structure
•   Relocating Data Directory
•   New MySQL Installation
•   MySQL Server Startup
•   Server Connections
•   MySQL User Accounts
•   Maintaining Logs
•   Server Tuning
•   Storage Configuration
•   Load Data Local Capability
•   Internationalization Issues
•   Running Multiple Servers
•   Updating MySQL
•   Internal Security-Filesystem
•   External Security - Network
•   Secure Connection Settings
•   Maintenance Principles
•   Database Maintenance
•   Preventative Maintenance
•   Making Database Backups
•   Copying Databases
•   Repairing Database Tables
•   Data Recovery Backups
•   Replication Servers Settings
•   Numeric Data Types
•   String Data Types
•   Date & Time Data Types
•   Spatial Data Types
•   Operators
•   Functions
•   System Variables
•   Session System Variables
•   Status Variables
•   User Defined Variables
•   SQL Statement Syntax
•   Compound Statement
•   Comment Syntax
•   Select Clauses - 1
•   Select Clauses - 2
•   From Clauses - 1
•   From Clauses - 2
•   Where Clauses
•   Group by & Having Clause
•   Order by Clauses - 1
•   Order by Clauses - 2
•   Conditional Evaluation
•   Condition Types - 1
•   Condition Types - 2
•   Condition Types - 3
•   Condition Types - 4
•   Null: The Four Letter Word
•   Database Copies
•   Secure Connections

Best Reference Books

MySQL Database Books

« Prev Page
Next Page »

MySQL Questions and Answers – Table Creation

Posted on December 25, 2017 by staff10

This set of MySQL Multiple Choice Questions & Answers (MCQs) focuses on “Table Creation”.

1. Which among the following is the correct syntax for creating table?
a) CREATE TABLE name;
b) CREATE name;
c) CREATE TABLE
d) All of the mentioned
View Answer

Answer: a
Explanation: None.

2. What is the role of “CONSTRAINS” in defining a table in Mysql?
a) Declaring primary key
b) Declaring Foreign Key
c) Restrictions on columns
d) All of the mentioned
View Answer

Answer: d
Explanation: None.

3. Which command is used for the table definition in Mysql?
a) DESC table_name;
b) DESC table_name
c) DESC
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

4. Which among the following is the correct syntax for defining “Constraint Check” in Mysql?
a) gender char(1) check( gender IN (‘M’, ‘F’)),
b) gender char (1) check,
c) gender char (1) check ( gender ),
d) none of the mentioned
View Answer

Answer: a
Explanation: Check constraint constrains the allowable values for a particular column.

5. Which data type character merge the “Check Constraint” into a data type definition?
a) ENUM
b) ENUM1
c) ENUM2
d) None of the mentioned
View Answer

Answer: a
Explanation: None.

6. Which among the following is the correct syntax for defining “ENUM” in Mysql?
a) gender ENUM (‘M’, ‘F’),
b) gender ENUM,
c) gender ENUM ( ),
d) none of the mentioned
View Answer

Answer: a
Explanation: None.

7. Which among the following are the correct definitions for “NULL” in Mysql?
a) Absence of value
b) Unknown
c) Empty set
d) All of the mentioned
View Answer

Answer: d
Explanation: None.

8. Find out the logical error in the following query?

   CREATE TABLE person
   ( person_id VARCHAR(20),
    Name VARCHAR (20),
    Address VARCHAR (20),
    Mobile_no  SMALLINT 
    );

a) Lesser number of columns
b) Incorrect definition
c) Primary key is missing
d) None of the mentioned
View Answer

Answer: c
Explanation: Primary key is an essential attribute for each table declared in Mysql.

9. What is meaning of “REFERENCES” in table definition?
a) Primary key
b) NULL
c) Foreign Key
d) A ”foreign Key” belong to this particular table
View Answer

Answer: d
Explanation: When “Foreign Key” declared in a table then it necessary to define the name of the table to which it belong with help of constraint “REFERENCES”.

10. What default value gets stored in columns of the table?
a) NULL
b) 0
c) 1
d) -1
View Answer

Answer: a
Explanation: NULL is the default value as it stands for “Absence of value”.

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.

« Prev Page - MySQL Questions and Answers – Using MySQL Command Line Tool
» Next Page - MySQL Questions and Answers – Populating & Modifying Tables – 1
« MySQL Questions and Answers – Using MySQL Command Line Tool
MySQL Questions and Answers – Populating & Modifying Tables – 1 »

Deep Dive @ Sanfoundry:

  1. C++ Programming Examples on Graph Problems & Algorithms
  2. C Programming Examples on Trees
  3. C Programming Examples on Stacks & Queues
  4. Oracle Database Questions and Answers
  5. LISP Questions and Answers
  6. C++ Programming Examples on Combinatorial Problems & Algorithms
  7. C Programming Examples on Graph Problems & Algorithms
  8. Java Programming Examples on Combinatorial Problems & Algorithms
  9. C Programming Examples on Combinatorial Problems & Algorithms
  10. MySQL Database Questions and Answers
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer and SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage & Cluster Administration, Advanced C Programming, SAN Storage Technologies, SCSI Internals and Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him below:
LinkedIn | Facebook | Twitter | Google+

Best Careers

Developer Tracks
SAN Developer
Linux Kernel Developer
Linux Driver Developer
Linux Network Developer

Live Training Photos
Mentoring
Software Productivity
GDB Assignment
Sanfoundry is No. 1 choice for Deep Hands-ON Trainings in SAN, Linux & C, Kernel Programming. Our Founder has trained employees of almost all Top Companies in India such as VMware, Citrix, Oracle, Motorola, Ericsson, Aricent, HP, Intuit, Microsoft, Cisco, SAP Labs, Siemens, Symantec, Redhat, Chelsio, Cavium, ST-Micro, Samsung, LG-Soft, Wipro, TCS, HCL, IBM, Accenture, HSBC, Mphasis, Tata-Elxsi, Tata VSNL, Mindtree, Cognizant and Startups.

Best Trainings

SAN I - Technology
SAN II - Admin
Linux Fundamentals
Advanced C Training
Linux-C Debugging
System Programming
Network Programming
Linux Threads
Kernel Programming
Kernel Debugging
Linux Device Drivers

Best Reference Books

Computer Science Books
Algorithm & Programming Books
Electronics Engineering Books
Electrical Engineering Books
Chemical Engineering Books
Civil Engineering Books
Mechanical Engineering Books
Industrial Engineering Books
Instrumentation Engg Books
Metallurgical Engineering Books
All Stream Best Books

Questions and Answers

1000 C Questions & Answers
1000 C++ Questions & Answers
1000 C# Questions & Answers
1000 Java Questions & Answers
1000 Linux Questions & Answers
1000 Python Questions
1000 PHP Questions & Answers
1000 Hadoop Questions
Cloud Computing Questions
Computer Science Questions
All Stream Questions & Answers

India Internships

Computer Science Internships
Instrumentation Internships
Electronics Internships
Electrical Internships
Mechanical Internships
Industrial Internships
Systems Internships
Chemical Internships
Civil Internships
IT Internships
All Stream Internships

About Sanfoundry

About Us
Copyright
TOS & Privacy
Jobs
Bangalore Training
Online Training
SAN Training
Developers Track
Mentoring Sessions
Contact Us
Sitemap
© 2011 Sanfoundry