|
|
Create Table example:
create table student(sno int primary key, name varchar(30),status char,birthdate date,salary money,pno int references project(pno)on delete cascade on update cascade);
Â
Insert Into Table:
insert into studenht values(1,'shubham','I');
Â
Select Examples:
select ename from employee,department where dname='finance' and city='Pune' and department.dno=employee.dno;
Â
Update Example:
update student set class='SYBCS' where rno=3;
Â
Delete Examples:
delete from project where pname='soft computing';
//for delete whole data :
delete from student;
Â
Add New Column:
alter table tablename add colum_name datatype;
Â
Drop Column:
alter table project drop remark;
Â
Change Datatype:
alter table table_name alter column_name type new_datatype;
Â
Rename Column:
alter table table_name rename oldcolumn_name to newcolumn_name;
Â
Rename Table:
alter table table_name rename to newtable_name;
Â
Add Constraint:
alter table table_name add contraint constraint_name unique(column_name);
Â
Drop a Table:
drop table table_name;
Â
Categories: None
The words you entered did not match the given text. Please try again.
Oops!
Oops, you forgot something.