DDL & DML Commands Interview Questions

    Question 1CREATE TABLE vs CREATE DATABASE

    What is the difference between CREATE TABLE and CREATE DATABASE commands?

    Question 2ALTER TABLE Capabilities

    What can the ALTER TABLE command do?

    Question 3INSERT vs INSERT INTO

    What is the difference between INSERT and INSERT INTO?

    Question 4Table Modification with ALTER

    You have an existing products table and need to: add a new column description (TEXT), modify price column to allow larger values DECIMAL(12,2), and drop the old_code column.

    Question 5UPDATE with vs without WHERE

    What happens when you use UPDATE command without WHERE clause?

    Question 6Data Insertion and Updates

    Insert a new employee (id=101, name='John Doe', dept='IT', salary=75000) into employees table, then update all IT employees' salaries by 10% increase.

    Question 7DDL vs DML Transaction Behavior

    How do DDL and DML commands behave differently in transactions?

    Question 8CREATE TABLE with Constraints

    Which constraints can be defined during CREATE TABLE?

    Question 9INSERT Methods and Syntax

    What are the different ways to use INSERT command?

    Question 10Conditional Deletion and Table Removal

    Delete all products with zero stock quantity from products table, then completely remove the temp_backup table from the database.