Sunday, August 10, 2014

how to create view in oracle?

Creating Views

Suppose we have EMP and DEPT table. To see the empno, ename, sal, deptno, department name and location we have to give a join query like this.
select e.empno,e.ename,e.sal,e.deptno,d.dname,d.loc
        From emp e, dept d where e.deptno=d.deptno;
So everytime we want to see emp details and department names where they are working we have to give a long join query. Instead of giving this join query again and again, we can create a view on these table by using a CREATE VIEW command given below
create view emp_det 
         as 
           select e.empno,
              e.ename,e.sal,e.deptno,d.dname,d.loc
        from emp e JOIN dept d ON e.deptno=d.deptno;
Now to see the employee details and department names we don’t have to give a join query, we can just type the following simple query.
select * from emp_det;
This will show same result as you have type the long join query.  Now you can treat this EMP_DET view same as  any other table.
For example, suppose all the employee working in Department No. 10 belongs to accounts department and most of the time you deal with these people. So every time you  have to give a DML or Select statement you have to give a WHERE condition like .....WHERE DEPTNO=10. To avoid this, you can create a view as given below

jQuery Bootgrid Plugin example

jQuery Bootgrid Plugin

jQuery Bootgrid Plugin
jQuery Bootgrid is a UI component written for jQuery and Bootstrap (Bootstrap isn’t necessarily required).A grid control especially designed for bootstrap.
Everything you need to start quickly is:
  1. Include jQuery, jQuery Bootgrid and Bootstrap libraries in your HTML code.
  2. Define your table layout and your data columns by adding the data-column-id attribute.
  3. Then select the previously defined table element represents your data table and initialize the bootgrid plugin.
  4. Specify your data url used to fill your data table.

Wholly : jQuery plugin to highlight Table Rows and Columns

Wholly : jQuery plugin to highlight Table Rows and Columns
A jQuery plugin to highlight table rows and columns on hover with rowspan and colspan support.

Bootstrap Table with jQuery

Bootstrap Table with jQuery
The table displays data in a tabular format and offers rich support to radio, checkbox, sort, pagination and so on. The table has been designed to reduce development time and to require no specific knowledge from developers. It is both featherweight and feature-rich.
Features:
  • Created for Bootstrap 3 (Bootstrap 2 supported)
  • Responsive web design
  • Scrollable Table with fixed headers
  • Fully configurable
  • Via data attributes
  • Show/Hide columns
  • Show/Hide headers
  • Get data in JSON format using AJAX
  • Simple column sorting with a click
  • Format column
  • Single or multiple row selection
  • Powerful pagination
  • Card view
  • Localization