Create a table studmarks with following attributes name and data type.

Create a table studmarks with following attributes name and data type Create a table studmarks with following attributes name and data type:

Rollno number (6), Regnumb number(14), semester number(1), cgpa number (5) and perform some other operations.

QUERY*

Create table studmarks (rollno number(6), regnumber number(14), semester number(1), cgpa number(5));

Desc studmarks;

As Shown Fig...2.1

Fig... 2.1
    Alter the table:
  1. Add the constraints UNIQUE for regnumber attribute from table.
  2. QUERY*

    Alter table studmarks modify (regnumber number(14) UNIQUE);

    As Shown Fig...2.2

    Fig... 2.2
  3. Remove the constraints for the regnumber attribute.
  4. Modify the data type of regnumber to varchar(16).

Comments

Popular posts from this blog

SQL IS NOT NULL.

Database Management System

SQL BETWEEN Operator Example.