0% found this document useful (0 votes)
12 views2 pages

Dbms 2A-1

The document outlines the creation of a database named 'Aishwarya1' and a table called 'villans' with various attributes. It includes the insertion of six records into the 'villans' table and a query to select all records. Additionally, it demonstrates altering the table to add a new column 'age' with a default value of 20.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

Dbms 2A-1

The document outlines the creation of a database named 'Aishwarya1' and a table called 'villans' with various attributes. It includes the insertion of six records into the 'villans' table and a query to select all records. Additionally, it demonstrates altering the table to add a new column 'age' with a default value of 20.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Practical 2A(1)

create database Aishwarya1;

USE Aishwarya1;

CREATE TABLE villans(

rollno int primary key,

name varchar(50),

marks int not null,

grade varchar(1),

city varchar(20)

);

insert into villans

(rollno,name,marks,grade,city)

values

(101,"Aakash",78,"C","Pune"),

(102,"Akshay",93,"A","mumbai"),

(103,"Aakansha",88,"B","mumbai"),

(104,"Aadesh",79,"C","delhi"),

(105,"Ankita",28,"F","delhi"),

(106,"Aish",83,"B","delhi");

select * from villans;

alter table villans

add column age int not null default 20;


Practical 2A(1)

OUTPUT:

You might also like