What is the function we can use for cummilative total.Example I have sales day wise ,i need to get results for each week it should come cummilative sales
Latest Answer : select salary,deptid from emp e1where 2=(select count(distinct(salary)) from emp e2 where e1.salary
Is it possible to insert a new column between two existing columns?for ex:i have a table with two cols:rollno and dateofbirth.suppose if i want a new column named 'name' to be included in between rollno and dateofbirth. is it possible.I know it is possible thro enterprise mgr. how to do using T-SQL
Latest Answer : hi select ..........col3,col2,col1 from tablename;just specify the columns in the reverse order i n the select statement. ...
Latest Answer : No, a table can have only one column of LONG datatype. If you try to create a table with more than one LONG column it will throgh an error saying that a table can have only one LONG type of coumn.Regards,Brajesh. ...
2 Student table Have Following Columns Student_name S1 S2 S3 S4 S5s1 - s5 are subject coulmns. A 87 75 65 77 99 b 34 65 77 88 55write select statement find a Student name ,maximum mark any of the subject s1 - s5output ex A 99 B 88
Needed a SQL query for this----------I have table with columns firstname, lastname and phone number and we have 2 entries in that table ...now I want to know the persons with this combination firstname
Latest Answer : I think you can use the cartesian product on the same table and try to get the data out of that. try this and let me know. ...
List the premium customers who is not using the service within the last one week.if you have these tables: 1-'Premuim_USER'columns: Customer_ID, post_paid.2-'calls'columns: called_number,
Latest Answer : SELECT a.customer_id FROM premium_user a, calls b WHERE a.customer_id=b.customer_id AND b.call_date NOT BETWEEN SYSDATE-7 AND SYSDATE AND TO_DATE(TO_CHAR(b.call_time_ended,'DD-MON-YYYY')) NOT BETWEEN SYSDATE-7 AND SYSDATE ...
How to print the number of columns in a particular table also the column names without using JDBC Result set meta data using pure SQL code.
Latest Answer : select count(column_name),column_name from user_tab_columns where table_name='tablename'; ...
How to arrange date in week wise like from Monday to Sunday?
Latest Answer : SELECT TO_CHAR(hiredate,'DAY') FROM emp ORDER BY to_char(hiredate-1,'D'); ...