Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
Dbms Manual II It

Dbms Manual II It

Ratings: (0)|Views: 176|Likes:
Published by Jagadeep Reddy
DBMS
DBMS

More info:

Published by: Jagadeep Reddy on May 08, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

12/17/2012

pdf

text

original

 
VAAGDEVI INSTITUTE OF TECHNOLOGY AND SCIENCEDATABASE MANAGEMENT SYSTEMS LAB PAGE NO: 1
DATABASE MANAGEMENT SYSTEMS
Branch&Year:II IT,I SemSI.NO NAME OF THE EXPERIMENT PAGE NO.1234567891011121314CREATING TABLES FOR VARIOUSRELATIONS IN SQLIMPLEMENTING THE QUERIES IN SQL FOR A.INSERTIONB.RETRIVALC.UPDATIOND.DELETIONCREATING VIEWSWRITING ASSERTIONSWRITING TRIGGERSPL/SQL PROGRAM FOR FINDING FACTORIAL OF AGIVEN NUMBER PL/SQL PROGRAM FOR FINDING FIBANACCI SERIESOF A GIVEN NUMBER PL/SQL PROGRAM TO FIND AREA OF CIRCLE FOR THE GIVEN RANGE OF RADIUS.PL/SQL PROGRAM FOR WITHDRAWING MONEYFROM GIVEN ACCOUNT NUMBER PL/SQL PROGRAM FOR DEPOSITING MONEY TO THEGIVEN ACCOUNT NUMBER PL/SQL PROGRAM FOR TRANSFERING MONEYFROM ONE ACCOUNT TO ANOTHER ACCOUNTPL/SQL PROGRAM FOR DISPLAYING HIGHESTBALANCE OF FIVE CUSTOMERSPL/SQL PROGRAM FOR FINDING GRADE ANDAVERAGE OF THE STUDENT IN STUDENT TABLEPL/SQL PROGRAM TO FIND GIVEN NO IS PRIME OR  NOT
 
VAAGDEVI INSTITUTE OF TECHNOLOGY AND SCIENCEDATABASE MANAGEMENT SYSTEMS LAB PAGE NO: 2
1.CREATING TABLES FOR VARIOUS RELATIONS IN SQL
Syntax for creating table:
Create table table name(column1 datatype,column2 datatype«««);1.Create table for the following schema.(with out constraints)Student(sid:int,sname:string,age:int,dob:date);Query.Create table Student(sid int,sname varchar(20),age int,dob date);The above table can be described using Desc command as,Desc Student;It can display the Student table.2. Create table for the following schema.(with primary key constraint).Student(sid:int,sname:string,age:int,dob:date);Create table Student(sid int constraint pkey primary key, sname varchar(20),ageint,dob date);3. Create table for the following schema.(with primary key constraint and not null).Student(sid:int,sname:string,age:int,dob:date);Create table Student(sid int constraint pkey primary key, sname varchar(20)not null, age int,dob date);4. Create table table for the following schema.(with check constraint age between 18 to 26);Student(sid:int,sname:string,age:int,dob:date);Create table Student(sid int, sname varchar(20), age int constraint chkey check(age between 18 and 26);5.Creating a table from another table.Syntax:Create table newtablename as select * from existingtablename;Crate a student2 table using any existing table.Query :Create table student2 as select * from student;
 
VAAGDEVI INSTITUTE OF TECHNOLOGY AND SCIENCEDATABASE MANAGEMENT SYSTEMS LAB PAGE NO: 3
Create a table including foreign key.
6.Creating table library which contains sid ,this sid having reference from student table.Query:create table library(sid int ,sname varchar(20),bid int,constraint fkey foreign key(sid)references student(sid));7.create a student table which contains some of fields of existing student tanle.Query.Create table student3 as select sid,sname ,age from Student.This can create a new student3 table with sid ,sname,sage columns of student table.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->