Friday, November 12, 2010

Create Own Linux - LFS LiveCD Project Homepage

LFS LiveCD Project Homepage: "What is the LFS LiveCD?

A LiveCD is a CD that is able to boot your system into a 'live', working operating system, independent of anything on your hard drive. It's a little different than an installation CD, which boots your system into a program that will guide you through the installation of some system onto your hard drive. With a LiveCD, you have an entire system contained on the CD and with that, the freedom to do nearly anything that a system installed on your hard drive can.

The LFS LiveCD is geared specifically toward providing a reliable host system for the purpose of building Linux From Scratch. Therefore, it may not be what you would envision as a 'perfect' Linux system. It should, however, provide you with a comfortable enough environment so that you can, in turn, build your own 'perfect' system.

For a more detailed description of the current version of the LiveCD read the documentation."

Thursday, November 11, 2010

MonaOS is a Free Operating System.

MonaOS is a Free Operating System.

Website

MonaOS is a free operating system.
It's new, small, simple, open source and well structured.
So, MonaOS may be suitable for education of operating system and program at school.
You can down load MonaOS for free at Download.

ABOUT

Free operating system.
Small, new and fast micro kernel operating system written in C++.
  • MonaOS is neither POSIX nor Windows clone.
  • Boot from floppy disk or CD-ROM.
  • Kernel size is now 98KB(2006/08/19)

REQUIREMENTS

  • Intel architecture 32(IA32)

SOURCE CODE AND SUBVERSION

You can check out latest source c
ode.
svn co https://monaos.svn.sourceforge.net/svnroot/monaos monaos
  • mona - Kernel and core servers.
  • contrib - Applications.

Introducing Java Beans

The basic idea of the Beans tutorial is to get you to the point where you can quickly create beans. You may want to write new beans from scratch, or you may want to take existing components, applets, or other classes and turn them into beans.
A second goal is to help you understand basic Beans concepts. It can be difficult to assimilate concepts and turn them into pragmatic programming techniques strictly by reading Beans source code, API interfaces, or even the Beans specification.
This tutorial is not a replacement for reading the Beans specification. Rather, it is designed to enhance your comprehension of the specification by providing concrete examples, and step-by-step guidelines for building and using Beans.
After working through sections fo this tutorial, you will find it helpful to reread corresponding sections of the Beans specification. You should also study the example source code provided by the BDK to further your understanding of beans.

Definition: What is a Bean?

If you have used Delphi, or Visual Basic, you are already familiar with the notion of a bean. The idea is the same; the programming language is different. A Java Bean is a reusable software component that works with Java. More specifically: a Java Bean is a reusable software component that can be visually manipulated in builder tools.
Definition: A Java Bean is a reusable software component that can be visually manipulated in builder tools. To understand the precise meaning of this definition of a Bean, clarification is required for the following terms:
  • Software component
  • Builder tool
  • Visual manipulation
Each of these will be addressed in turn.

Reusable Software Components

Reusable software components are designed to apply the power and benefit of reusable, interchangeable parts from other industries to the field of software construction. Other industries have long profited from reusable components. Reusable electronic components are found on circuit boards. A typical part in your car can be replaced by a component made from one of many different competing manufactuers. Lucrative industries are built around parts construction and supply in most competitive fields. The idea is that standard interfaces allow for interchangeable, reusable components.
Reusable software components can be simple like familiar push buttons, text fields list boxes, scrollbars, dialogs, for example

Button Beans

Slider Beans

Spinbutton Beans

These are the kinds of component sets, toolkits, or widget libraries traditionally sold by third parties. Lately we've seen vendors selling more complex software components like calendars,

and spreadsheets:

If you have used visual component assembly tools such as Visual Age, Delphi, Visual Basic, PARTS, Mojo, or even PowerBuilder, you are familiar with the notion of software components. Visual Basic Extensions (VBX's) were the first widely used software components, followed shortly by language-independent OLE Custom Controls (OCXs). UNIX programmers will be more familiar with widgets and toolkits.
Reusable components add standardized interfaces and object introspection mechanisms to widgets allowing builder tools to query components about their properties and behavior. Software components need not be visible in a running application; they only need to be visible when the application is constructed.
For example, the builder tool above shows a calculator component that is built from 16 button components, a text field component, and a panel upon which the buttons and a text display are placed. In addition, you can see five invisible components. These specific components hold values or strings used by the calculator for intermediate calculations, operation codes, and display strings, as well a boolean flag to determine when evaluation of a new expression is started.
A programmer can move, query, or visually hook together components such as numeric value holders, disk accessors, or network socket components with a mouse while operating a builder tool. However, such components would do their work invisibly while the application is running.
With Beans, you can purchase custom components for Java from third parties. You can also purchase builder tools or application contruction programs supporting Beans Application construction tools let you you to build Java applications by visually selecting components from pallets, panels, or menus, drop them into a form, or client window, and hook up events to event handlers using the mouse as your primary input mechanism.
Components can be nested and arbitrarily complex. For example, a calculator built from components becomes, itself, a component. Custom-built components are easily added to builder tool palettes. More complex components include barcharts,
graphical diagram editors,
and word processors:

Beans, Widgets, Controls, and Components

Depending on your background, you may use different words to describe GUI components for a given software platform. If you come from a Windows background, you probably think in terms of visual controls, possibly Visual Basic Extensions (VBXs) or OLE Controls (OCXs) and now Active X Controls. If you're more accustomed to environments like Motif or X Windows, you probably think in terms of toolkits or widgets.
Beans are to widgets as VBXs or OCXs are to native Windows controls. The main difference between Beans and native platform controls is that they define a design-time interface, which allows application designer tools, or builder tools to query components and ask them what kinds of properties they define, as well as what kinds of events they can generate or respond to.
In visual application builder environments Beans are sometimes referred to as reusable software components, or custom controls.
The main thing that distinguishes software components from standard Windows controls, or Motif widgets is their packaging. Software components or custom controls are packaged with design-time information (properties and methods) that allow builder tools to determine their capabilities.
A second difference is that end users, or third party suppliers can build custom beans independently of the maker of the GUI platform or operating system. These third-party components can then be distributed by IS departments to internal enterprise clients, or they can be sold as add-on components to anyone who uses builder tools to construct applications.

Beans or Class Libraries

It's logical to wonder: "What is the difference between a Java Bean and an instance of a normal Java class?"
What differentiates Beans from typical Java classes isintrospection. Tools that recognize predefined patterns in method signatures and class definitions can "look inside" a Bean to determine its properties and behavior. A Bean's state can be manipulated at the time it is being assembled as a part within a larger application. The application assembly is referred to as design time in contrast to run time. In order for this scheme to work, method signatures within Beans must follow a certain pattern in order for introspection tools to recognize how Beans can be manipulated, both at design time, and run time.
In effect, Beans publish their attributes and behaviors through special method signature patterns that are recognized by beans-aware application construction tools. However, you need not have one of these construction tools in order to build or test your beans. The pattern signatures are designed to be easily recognized by human readers as well as builder tools. One of the first things you'll learn when building beans is how to recognize and construct methods that adhere to these patterns.
Not all useful software modules should be Beans. Beans are best suited to software components intended to be visually manipulated within builder tools. Some functionality, however, is still best provided through a programatic (textual) interface, rather than a visual manipulation interface. For example, an SQL, or JDBC API would probably be better suited to packaging through a class library, rather than a Bean.

May Your Palette be Rich and Full

Still, Beans are tremendously useful, especially for programmers who consider themselves domain experts (financial analysts, scientists, linguists, bank loan officiers, investment analysists, factory process experts), rather than systems programmers.
Ideally, enterprise programmers and domain experts will have a rich pallet of Beans from which to assemble Beans applications.



Definition: Application Builder Tools

The primary purpose of beans is to enable the visual construction of applications. You've probably used or seen applications like Visual Basic, Visual Age, or Delphi. These tools are referred to as visualapplication builders, or builder tools for short.
Typically such tools are GUI applications, although they need not be. There is usually a palette of components available from which a program designer can drag items and place them on a form or client window.
In Windows environments the form is often called the client window area.
The form, or client window, represents the target application under construction and is presented, during design, as it will appear when it runs independently of the builder program.
The most tell-tale window shared by many popular application builders is a property sheet, sometimes called a property editoror simply a properties window.
A property sheet is used to modify properties and eventsassociated with components. In keeping with Java AWT terminology some property editors use the term action in place of event.
Applications built with powerful components can appear complex even when they take little effort to build.

Linking Components in Builder Tools

The calculator program shown earlier is a good example of building a complex program with no handwritten code.
The calculator was built without writing any Java code. Instead, components were linked by using a mouse. Generated events and event-handler methods were selected through pop-up menus.
Every time a button is pressed, an event is fired and side effects result. Example side effects include appending digits to the invisible EnteredString storage buffer, performing a math operation, or displaying text in the display pane. To program an event sequence, select a button as the event source, and indicate that you want to fire an event through a keystroke or menu command. You'll see a menu, or a property sheet, listing events that can be fired. Select an event, then drag a link to the target object which should receive the event. You will be presented with a menu listing event handlers available for the target object.
The following sequence of screens shows a more complex example in a different builder tool. An animation component is added to a subpanel within a client window. First an Animation Bean is selected from the builder's palette and dropped on a panel object in the client form.
A Bean is customized by selecting action items from a property sheet, which in turn invokes a custom Bean editor to select a specific event from a list of events that can be generated by an Animation Bean. A list of events is acquired by introspection; the builder tool uses Java introspection APIs to query beans dropped on the form.
Default behavior for event handlers is usually acceptable, but in some cases you'll want to manually override handler definitions with a text editor.
In this builder tool, much of the programming, including selection of events and event handlers, is done using a class hierarchy browser. After selecting the event-handler method, a template for the event handler is generated, while you flesh out details manually by writing code in the browser.
However not all programs require text editing. As mentioned, the calcualtor example was built without resorting to text coding. The maze of links required to hookup components can be overwhelming, as you can see in the following figure.
But, most builder tools allow you to easily edit links and filter the display of links so that you see only the level of detail that you want.

Nesting Components

Once you have assembled components into an application, often that application itself can be turned into a component. An earlier example showed an Animation component dropped onto a panel to display an animation. Most of the code for the example was created through menu selections. The component was customized primarily by specifying the names of animation files to be displayed from the disk. The mouseDrag event handler was overriden through the browser for detailed customization.
Once custom properties and behavior are defined, they can be preserved by making a new Bean out of the customized instance. This is usually accomplished by serializing the customized Bean using Java's built-in support for object serialization. Most builder tools provide a way to turn compound components into custom Beans. In this example you select the Animation Bean, and issue a menu command to turn it into a Bean component.
The builder generates code to turn the assembly (property and behavior definitions) into a Bean. The bean is added to the component palette of the builder tool. Alternately the bean can be packaged in a JAR archive file for sale, or distribution to clients.
You could take the new custom Bean and use it to compose a compound assembly, creating yet another custom Bean. For example, you could group three instance of a MyAnimationBean on a panel and save the whole assembly as a single new Bean. The compound MyThreeBeans custom component is added to your builder's component palette as a single Bean.

But I hate GUI builders

Over and over again, you hear advanced programmers say that builder tools are more trouble than they are worth. "If you really know what you are doing," they say, "You're best off building code for GUI applications by hand. I've tried GUI builder tools, and they're more trouble than they're worth."
To be clear, a GUI builder, or window builder, is a different beast than an application builder. Many programmers are familiar with window builders and their limitations. In a window builder you design screens visually, and code is generated that becomes part of an application built with traditional compilation tools.
Application builders let you do all of this, but in addition, they let you visually hook up components, select events to be fired, and handlers for events through mouse drag, or menu selection. Very little code needs to be written by hand to get the initial component interaction working properly--at least in comparison to a GUI builder or a window builder.
Also, GUI bulders are typically one-way tools. They allow you to build your interface visually and generate code from a project file. In most cases, however, if you edit the generated code manually, the changes are not propagated backward to the visual representation of the application in the project file.
Tools like Delphi and Visual Basic are much more sophisticated than traditional GUI builders in that modified code does propagate backward to the visual representation. Powerful language parsers are required to make this work properly. The text is parsed and the new representation of visual objects is merged with the old representation (sort of like a binary diff utility). Because older window builders did not provide such a capability, many programmers became frustrated with the tools once they moved past early design stages. They rightly concluded that only a minor amount of work goes into the physical layout of GUI components. Most of the work for any application goes into component hook up, event generation, and event handling methods.
Unfortunately, many programmers, familiar only with the older window builder tools, believe the current generation of application builders suffer from the same restrictions. However, the current generation of builder tools provides enough flexibility and power to warrant another look.

Java Applet Advantages and Disadvantages

Java applet

A Java applet is an applet delivered in the form of Java bytecode. Java applets can run in a Web browser using a Java Virtual Machine (JVM), or in Sun's AppletViewer, a stand-alone tool for testing applets. Java applets were introduced in the first version of the Java language in 1995. Java applets are usually written in the Java programming language but they can also be written in other languages that compile to Java bytecode such as Jython.

Applets are used to provide interactive features to web applications that cannot be provided by HTML. Since Java's bytecode is platform independent, Java applets can be executed by browsers for many platforms, including Windows, Unix, Mac OS and Linux.There are open source tools like applet2app which can be used to convert an applet to a stand alone Java application/windows executable/linux executable. This has the advantage of running a Java applet in offline mode without the need for internet browser software.

A Java Servlet is sometimes informally compared to be "like" a server-side applet, but it is different in its language, functions, and in each of the characteristics described here about applets.

Technical information

Java applets are executed in a sandbox by most web browsers, preventing them from accessing local data. The code of the applet is downloaded from a web server and the browser either embeds the applet into a web page or opens a new window showing the applet's user interface. The applet can be displayed on the web page by making use of the deprecated applet HTML element [1], or the recommended object element [2]. This specifies the applet's source and the applet's location statistics.

A Java applet extends the class java.applet.Applet, or in the case of a Swing applet, javax.swing.JApplet. The class must override methods from the applet class to set up a user interface inside itself (Applet is a descendant of Panel which is a descendant of Container).

Advantages

A Java applet can have any or all of the following advantages:

* it is simple to make it work on Linux, Windows and Mac OS i.e. to make it cross platform
* the same applet can work on "all" installed versions of Java at the same time, rather than just the latest plug-in version only. However, if an applet requires a later version of the JRE the client will be forced to wait during the large download.
* it is supported by most web browsers
* it will cache in most web browsers, so will be quick to load when returning to a web page but may get stuck in the cache and have issues when new versions come out.
* it can have full access to the machine it is running on if the user agrees
* it can improve with use: after a first applet is run, the JVM is already running and starts quickly, benefitting regular users of Java but the JVM will need to restart each time the browser starts fresh.
* it can run at a comparable (but generally slower) speed to other compiled languages such as C++, but many times faster than JavaScript
* it can move the work from the server to the client, making a web solution more scalable with the number of users/clients

Disadvantages

A Java applet is open to any of the following disadvantages:

* it requires the Java plug-in, which isn't available by default on all web browsers.
* an implementation of the Sun Java plug-in does not exist for AMD64/Intel64 processors.1
* it cannot start until the Java Virtual Machine is running, and this may have significant startup time the first time it is used.
* if untrusted, it has severely limited access to the user's system - in particular having no direct access to the client's disk or clipboard.
* some organizations only allow software installed by the administrators. As a result, many users cannot view applets by default.
* applets may require a specific JRE.

1. However, open source and freeware implementations are available, such as the GCJ plugin, and Blackdown Java plugin.

Compatibility issues

Sun has made a considerable effort to ensure compatibility is maintained between Java versions as they evolve. For example, Microsoft's Internet Explorer, the most popular web browser since the late 1990s, used to ship with the Microsoft Java Virtual Machine as the default. The MSJVM had some extra non-Java features added which, if used, would prevent MSJVM applets from running on Sun's Java (but not the other way round).[citation needed] Sun sued for breach of trademark, as the point of Java was that there should be no proprietary extensions and that code should work everywhere. Development of MSJVM was frozen by a legal settlement, leaving many users with an extremely outdated Java virtual machine. Later, in October 2001, MS stopped including Java with Windows, and for some years it has been left to the computer manufacturers to ship Java independently of the OS.

Some browsers (notably Netscape) do not do a good job of handling height=100% on applets which makes it difficult to make an applet fill most of the browser window (JavaScript can, with difficulty, be used for this). Having the applet create its own main window is not a good solution either, as this leaves the browser window as a largely useless extra window and leads to a large chance of the applet being terminated unintentionally by the user closing the parent browser window.

Alternatives

Alternative technologies exist (for example, DHTML, Flash, and Microsoft Silverlight) that satisfy some of the scope of what is possible with an applet.

Another alternative to applets for client side Java is Java Web Start, which runs outside the browser. In addition to the features available to applets, a simple permissions box can give Java Web Start programs read and/or write access to specified files stored on the client, and to the client's clipboard.

Monday, November 8, 2010

Create simple procedure in PL/SQL Oracle

Subprograms

Subprograms are named PL/SQL blocks that can be called with a set of parameters.
There are two types of blocks in PL/SQL:
•    Procedures
•    Functions

Structure Of Oracle Procedure(Anonymous block)

DECLARE         (optional)
        /* Variable Block                     */
    BEGIN             (mandatory)
        /* Executable Statements / Queries     */
    EXCEPTION    (optional)
        /* Exception Action                 */
END;                (mandatory)
/

Syntax of Oracle Procedure

CREATE [OR REPLACE] PROCEDURE procedure_name
 [(parameter1 [mode1] datatype1,
  parameter2 [mode2] datatype2,
  . . .)]
IS|AS
PL/SQL Block;

Structure Of Oracle Procedure(Named block)

CREATE [OR REPLACE] PROCEDURE procedure_name          (mandatory)
        /* Variable Block                     */
    BEGIN             (mandatory)
        /* Executable Statements / Queries     */
    EXCEPTION    (optional)
        /* Exception Action                 */
END;                (mandatory)
/

Modes:

•    IN: procedure must be called with a value for the parameter. Value cannot be changed
•    OUT: procedure must be called with a variable for the parameter. Changes to the parameter are seen by the user (i.e., call by reference)
•    IN OUT: value can be sent, and changes to the parameter are seen by the user

Default Mode is:

IN

Consider Table

Table Name: Example
NAME             VARCHAR2(10)
NUM              NUMBER(3)
                                                                                                                                                                               

Table Data

Select * from example;
NAME       NUM                    
---------- ----------------------
NAMEONE    1                      
NAMETWO    2                      
NAMETHREE  3                      
NAMEFOUR   4                      
NAMEFIVE   5                      
NAMESIX    6                      
NAMESEVEN  7                      
test -100  100                    
test -200  200                    
test -300  300                    
test -500  500        
11 rows selected

Simple Procedure For Get Name From Example Table

Create or replace procedure p_getname
(v_num IN example.num%TYPE,
v_name OUT example.name%TYPE)
/*    v_num     - Input Parameter            */
/*    v_name     - Output Parameter            */
IS
BEGIN
    select name
    into v_name
    from example
    where v_num = num;
END;
/

Calling the Procedure

set serveroutput on;
declare
    getname  example.name%TYPE;
begin
    p_getname(1,getname);
    dbms_output.put_line('-----------');
    dbms_output.put_line(getname);
end;
/

Sample Output:

anonymous block completed
-----------
NAMEONE

Wednesday, July 14, 2010

Step By Step Example For Object Type In Oracle

Step By Step Example For Object Type In Oracle

Create Object Type

-----------------------------------------------------------------------------------
SQL> CREATE TYPE ObjectPersonType AS OBJECT (
  2    ID       NUMBER,
  3    FNAME    VARCHAR2(20),
  4    LNAME    VARCHAR2(25),
  5    PHONE    VARCHAR2(20),
  6    MAP MEMBER FUNCTION get_idno RETURN NUMBER,
  7    MEMBER PROCEDURE display_details ( SELF IN OUT NOCOPY ObjectPersonType ));
  8  /

Type created.
-----------------------------------------------------------------------------------

here,  object variables are,
ID       NUMBER,
FNAME    VARCHAR2(20),
LNAME    VARCHAR2(25),
PHONE    VARCHAR2(20)

and
Object Memeber Functions,Procedures are
MAP MEMBER FUNCTION get_idno RETURN NUMBER
-- Return Self ID Number,
MEMBER PROCEDURE display_details ( SELF IN OUT NOCOPY ObjectPersonType )
-- In & Out Is Own Type Parameter

-----------------------------------------------------------------------------------

Create/ Replace Type Body

SQL> CREATE OR REPLACE TYPE BODY ObjectPersonType AS
  2    MAP MEMBER FUNCTION get_idno RETURN NUMBER IS
  3    BEGIN
  4      RETURN ID;
  5    END;
  6    MEMBER PROCEDURE display_details ( SELF IN OUT NOCOPY ObjectPersonType ) IS
  7            BEGIN
  8      -- use the PUT_LINE procedure of the DBMS_OUTPUT package to display details
  9              DBMS_OUTPUT.PUT_LINE(TO_CHAR(ID) || ' ' || FNAME || ' ' || LNAME);
  10      DBMS_OUTPUT.PUT_LINE(PHONE);
 11    END;
 12  END;
 13/

Type body created.
-----------------------------------------------------------------------------------

Create New Table Using Object Type (ObjectPersonType)

Description:
Table Name Is PERSONLIST,
Fields are, RECORDDATE as Date & DETAILS As ObjectPersonType(Using Defined Object Type)

CREATE TABLE PERSONLIST (
  RECORDDATE   DATE,
  DETAILS              ObjectPersonType);

Table created.
-----------------------------------------------------------------------------------

Insert Values For PERSONLIST

INSERT INTO PERSONLIST VALUES (
                SYSDATE,  ObjectPersonType (25, 'Raaj', 'Malik','9876700001'));

1 row created.

INSERT INTO PERSONLIST VALUES (
                SYSDATE,  ObjectPersonType (21, 'Boss', 'Sivaji','9876700002'));

1 row created.
-----------------------------------------------------------------------------------

Select Statements For Object Type


SQL> SELECT * FROM PERSONLIST;

RECORDDAT
---------
DETAILS(ID, FNAME, LNAME, PHONE)
--------------------------------------------------------------------------------
13-JUL-10
OBJECTPERSONTYPE(25, 'Raaj', 'Malik', '9876700001')

13-JUL-10
OBJECTPERSONTYPE(21, 'Boss', 'Sivaji', '9876700002')


SQL> SELECT DETAILS FROM PERSONLIST;

DETAILS(ID, FNAME, LNAME, PHONE)
--------------------------------------------------------------------------------
OBJECTPERSONTYPE(25, 'Raaj', 'Malik', '9876700001')
OBJECTPERSONTYPE(21, 'Boss', 'Sivaji', '9876700002')


SQL> SELECT DETAILS FROM PERSONLIST WHERE RECORDDATE=( SELECT MAX(RECORDDATE) FROM PERSONLIST);

DETAILS(ID, FNAME, LNAME, PHONE)
--------------------------------------------------------------------------------
OBJECTPERSONTYPE(21, 'Boss', 'Sivaji', '9876700002')

SQL> SELECT c.DETAILS.get_idno() FROM PERSONLIST c;

C.DETAILS.GET_IDNO()
--------------------
                  25
                  21

SQL> SELECT Obj.DETAILS.FNAME FROM PERSONLIST Obj;

DETAILS.FNAME
--------------------
Raaj
Boss


SQL> SELECT DETAILS FROM PERSONLIST Obj WHERE Obj.DETAILS.FNAME='Raaj';

DETAILS(ID, FNAME, LNAME, PHONE)
--------------------------------------------------------------------------------
OBJECTPERSONTYPE(25, 'Raaj', 'Malik', '9876700001')


SQL> DECLARE
  Obj OBJECTPERSONTYPE;
BEGIN
  SELECT DETAILS INTO Obj FROM PERSONLIST WHERE RECORDDATE=( SELECT MAX(RECORDDATE) FROM PERSONLIST);
  Obj.display_details();
END;
/
21 Boss Sivaji
9876700002

PL/SQL procedure successfully completed.
--------------------------------------------------------------------------------




Sunday, June 27, 2010

General VI Commands In Unix

General VI Commands In Unix

Create/Edit File
vi:
vi filename

Save Command In Unix
:w

Save Existing File Command In Unix
:w!

Save & Exit Command In Unix
:wq

Exit Command In Unix
:q

Exit without Save Command In Unix
:q!

Saturday, June 26, 2010

Get Oracle Version ( SQL )

Select Database Version
select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
PL/SQL Release 10.2.0.2.0 - Production
CORE    10.2.0.2.0      Production
TNS for Solaris: Version 10.2.0.2.0 - Production
NLSRTL Version 10.2.0.2.0 - Production  

 


Select Full Product Details
select * from product_component_version;

PRODUCT
----------------------------------------------------------------
VERSION
----------------------------------------------------------------
STATUS
----------------------------------------------------------------
NLSRTL
10.2.0.2.0
Production

Oracle Database 10g Enterprise Edition
10.2.0.2.0
Prod

PRODUCT
----------------------------------------------------------------
VERSION
----------------------------------------------------------------
STATUS
----------------------------------------------------------------

PL/SQL
10.2.0.2.0
Production

TNS for Solaris:
10.2.0.2.0

PRODUCT
----------------------------------------------------------------
VERSION
----------------------------------------------------------------
STATUS
----------------------------------------------------------------
Production





Select Version With Banner

select * from v$version where banner like 'Oracle%';
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod



Select Version With Banner

select * from v$version where banner like 'PL/SQL%';
BANNER
----------------------------------------------------------------
PL/SQL Release 10.2.0.2.0 - Production



Friday, June 25, 2010

Create table In Oracle

Table Creation Simple Example

CREATE TABLE Syntax:
CREATE TABLE TABLENAME (
   field1 data_type,
   field2 data_type,
   ...
   ...
   fieldn data_type
)

here,
Consider
Two Fields;
1) E_ID as number
2) E_Name as varchar(20)

CREATE TABLE Example
CREATE TABLE EMPLOYEE
   (
   E_ID NUMBER,
   E_NAME VARCHAR2(20)
   );