How to retrieve odd and even number of rows from a table?
Latest Answer: select * from (select rownum as rwid, a.* from (SELECT empno,ename,job,mgr,hiredate,sal,comm,deptno from emp) a) where mod(rwid,2) = 1
This query will be helpful to find out the odd records for even records just change to mod(rwid,2) = 0
Thanks
Aditya ...
How many Primary keys and Primary Indexes can we create on a table.How many Foreign keys and Secondary indexes can we create on a table.How many maximum columns can we create in a table
Latest Answer: Yeah it is possible, only one primary key for any table.But any number of foreign keys can be created. ...
How to open an excel sheet directly from the SQL prompt?
How to write a query in SQL 2005 in order to Select 10 random records from table?
Latest Answer: select top 10 * from tablename orderby newid() ...
How to convert any kind of date that comes in any format from the user to 'yyyymmdd' in Oracle?
Latest Answer: To convert a date in a specified format you need to convert it into character..select to_char(hire_date, 'yyyymmdd') date from employees; ...
How to retrieve names from table starting with a particular character as a first letter, using with substring, instring without using LIKE function.
Latest Answer: Consider the table EMPLOYEES with the column ENAME. Try with the following queries.Select ename from employeeswhere Instr(ename,'&A') = 1group by ename;'A' --> your starting character.ORSelect enameFrom employeesWhere Substr(ename,1,1) ...
How to date track 2 tables to a previous month, using SQL code
How to create table emp1 based on emp, except comm column?
Latest Answer: create table emp1 as select * from emp; ...
How do we view the query used while creating a View table? i.e How to find the dependencies of a view table.
Latest Answer: If you have toad, you can see everything. Just navigate to view throgh schema browser and check under the tabs "view". select your view and check all the properties from it. ...
How to display & in Oracle SQL output
Latest Answer: Use concatenate operator ...SQL> select 'a'||'&'||'b' from dual;'A'---a&b ...
View page << Previous 1 [2] 3 4 5 6 7 8 9 10 Next >>

Go Top