Select from table without using column name
How can I select column values from a table without knowing the column name ?Suppose , select employee_id from employees , now I don't know the column name and I want to select the column.Please let me know the answer
How to find the max value in a sequence?
If you don't own the sequence, you may look at all_sequences, which shows sequences in other schemas that you have access to:select max_valuefrom sys.all_sequenceswhere sequence_owner = '&sequence_owner' and sequence_name = '&sequence_name'
We can get the MAX value of a sequence by using the data dictionary view
'USER_SEQUENCES' .
i.e. SELECT MAX_VALUE FROM USER_SEQUENCES
WHERE SEQUENCE_NAME='NAME_OF_SEQUENCE'
Hi,select * from tab; - means we can see all the tables,right!Is there any option similar to this..?
Select distinct TABLE_NAME
from user_tab_columns;
Synonym name Synonym for Table CAT USER_CATALOG CLU USER_CLUSTERS DICT DICTIONARY IND USER_INDEXES ...
Use this simple query
delete from table1 where rowid not in (select max(rowid) from table1 group by duplicate_col_name)
Hi, 'X' refers here to the table name and 'a' and 'b' are the alias nameDelete from X a where rowid in (select min(rowid) from X b &...
select count(case when sex='male' then 1 end) "male", count(case when sex='female' then 1 end)"male", city from cnt where city = 'bangalore';
SELECT city,DECODE(sex,'M',COUNT(sex),null)male, DECODE(sex,'F',count(sex),null)female FROM test GROUP BY city,sex;
This will give the name of city along with corresponding number of male and female on that city.
select e.ename,e.deptno,d.deptno from emp e,dept d where e.deptno=d.deptno(+);
Select emp_name from emp awhere not exists(select 1  ...
You can Apply This.
Select * from tablename where signin value("serverhost" "root" "viky")
$email[eml]
$pass[pass]
iffisset[login value-submit]
1. Describe tablename
2. Desc tablename
3. select * from tablename