Write a query to create the “Student” table (SID, Sname, SAge, SDept, SCity), where the Student ID and Student Name cannot be NULL. 2. Write a query to alter the above “Student” table, where a new column of Date of Birth (DOB) must be added, and it should not have any NULL values. 3. Write a query to alter the “Student” table, where a CHECK constraint must be added to the “SCity” column and it must be “Vellore”.
Write a query to create the “Student” table (SID, Sname, SAge, SDept, SCity), where the Student ID and Student Name cannot be NULL. 2. Write a query to alter the above “Student” table, where a new column of Date of Birth (DOB) must be added, and it should not have any NULL values. 3. Write a query to alter the “Student” table, where a CHECK constraint must be added to the “SCity” column and it must be “Vellore”.
Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter8: Advanced Sql
Section: Chapter Questions
Problem 12P: Assuming that the CUSTOMER table contains a CUST_AGE attribute, write the query to update the values...
Related questions
Question
100%
IN MYSQL
1. Write a query to create the “Student” table (SID, Sname, SAge, SDept, SCity), where the Student ID and Student Name cannot be NULL.
2. Write a query to alter the above “Student” table, where a new column of Date of Birth (DOB) must be added, and it should not have any NULL values.
3. Write a query to alter the “Student” table, where a CHECK constraint must be added to the “SCity” column and it must be “Vellore”.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning