select count(*) from TableName // To Count The Number of Row(s) in a Particular table
Ex: Select Count(*) from emp;
select count(*) from user_tab_columns where table_name='TABLENAME';
// To Count The Number of Column(s) in a Particular table,
Note :TABLENAME Should be UPPERCASE Letter
Ex: Select count(*) from user_tab_columns where table_name = 'EMP'
Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts
Tuesday, November 27, 2007
Wednesday, July 11, 2007
Inserting Date And Selecting Particular Date From Table Using Oracle
Cearting A Sample Table With The Date Field
select * from EMP1_Test where to_char(dob,'MM/DD/YYYY') = '10/10/1999' 
create table EMP1_Test(id varchar(5),Fname varchar(10), DOB date)
insert into EMP1_Test(ID,FNAME,DOB) values('1','Test',to_date('19991010','yyyymmdd'))
insert into Emp1_Test(ID,FNAME,DOB) values('2','Test',to_date('11101999','mmddyyyy'))
insert into Emp1_Test(ID,FNAME,DOB) values('2','Test',to_date('11101999','mmddyyyy'))
select * from EMP1_test
select * from EMP1_Test where to_char(dob,'MM/DD/YYYY') = '10/10/1999'

Subscribe to:
Posts (Atom)
