Add NOT NULL and DEFAULT to a column

SQL Easy 7 views
Back to Questions

Problem Description

You have a table Employees(emp_id, name, dept_id, salary, hire_date). Make dept_id mandatory and set default salary as 30000 for new rows.

Input Format

SQL DDL

Output Format

DDL statement(s)

Sample Test Case

Input:
Employees(emp_id, name, dept_id, salary, hire_date)
Output:
Altered table

Constraints

Use generic SQL

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Next