sql query to drop column


sql query to drop column


alter table tablename drop column columnname;

sql query to rename table name in oracle/rename oracle table


sql query to rename table name in oracle/rename oracle table


alter table oldtablename rename to newtablename

sql query to add new column to table in oracle


sql query to add new column to table  in oracle


alter table tablename add (columname columndatatype)
 

sql query to rename column in oracle/renaming column in oracle


sql query to rename column in oracle



alter table tablename rename column oldcolumn to newcolumn
 

sql query to convert date to mm/dd/yyyy hh:mi:ss including AM/PM


sql query to convert date to mm/dd/yyyy hh:mi:ss including AM/PM.



SELECT to_char(sysdate,'mm/dd/yyyy hh:mi:ss PM')Alias from dual;


output-

11/14/2012 07:56:46 AM

sql query to get 5th record in oracle-how to get 5th record of table in oracle


sql query to get 5th record in oracle



SELECT * FROM tablename WHERE rownum <= 5  MINUS  SELECT * FROM tablename where rownum < 5;

 

sql query to convert date to mm/dd/yyyy hh:mi:ss format -oracle sql queries-to_char function


sql query to convert date to mm/dd/yyyy hh:mi:ss format




SELECT to_char(sysdate,'mm/dd/yyyy hh:mi:ss')Alias from dual;


output-


11/14/2012 07:56:29

sql query to get system date in oracle



sql query to get system date in oracle


select sysdate from dual


output-

14-NOV-12

Recent Posts