Back To Normal

Subscribe To Our E-Mail Newsletter

Thursday, April 29, 2010

Difference between Subquery and Joins?

Sub query is also query which returns one or more values,we
can retrieve the data based on the condition...

Join is used to join the two tables and used to retrieve the
data from one or more tables.
Read More


What is Primary and Foreign key in databases?

Primary key:
   Each table can have one primary key, which uniquely identifies each row in a table and ensures that no duplicate rows exist.
 
   Foreign Key:
   On whichever column you put FOREIGN KEY constraint then the values in that column must refer to existing values in the other table. A foreign key column can refer to primary key or unique key column of other tables.
Read More


Wednesday, April 28, 2010

Explain about the following things in Databases?

1. What is foreign key and Primary key , how do you differentiate?
2. What is Index in the table?
3. How do we differentiate producer and function in Database?
4. What is trigger in Databases?
Read More


what is view in SQL Server?

A view is a virtual table that consists of columns from one or more tables. Though it is similar to a table, it is stored in the database. It is a query stored as an object. Hence, a view is an object that derives its data from one or more tables. These tables are referred to as base or underlying tables


syntax:
CREATE VIEW vwCustomer
AS
SELECT CustomerId, Company Name, Phone
FROM Customers


For more information, see the below link..



http://www.sql-server-performance.com/articles/dev/views_in_sql_server_p1.aspx
Read More


Thursday, April 8, 2010

How to take backup in oracle?

 For Exporting the Database :
exp file=RPM62B13.dmp userid=devusr/Usrdev1234@RPM62B13.symphonysv.com fully=y
log=AgileExpBackup.log

For Exporting the tables :
exp  file=empdept.expdat  userid=devusr/Usrdev1234@RPM62B13.symphonysv.com tables=(EMP,DEPT) log=empdept.log
Read More


Drop and truncate in Database?

drop table tablename;
  It will  delete per-mentally the table and data.
 truncate table tablename;
  it will delete the data from the table.
Read More


How to copy the table in oracle?

  •  Copy the table structure with data
        create table emp_copy as
          select *
            from Employee;

  •   Copy the table structure with out data  
            CREATE TABLE Table2 AS 
               SELECT * FROM Table1 WHERE 1=0;
       Note: if condition is not validating then it wont copy the data. 
  •  Copying selected columns from another table
                   CREATE TABLE newTable
                        AS (SELECT empno, ename
                                    FROM emp);
Read More


constraints in Oracle

They are five integrity constraints are available in Oracle.
  1. Not Null
  2. Primary key
  3. Foreign key
  4. Check
  5. unique    
For more information , Refer the following URLs
 http://www.oracle-dba-online.com/sql/integrity_constraints.htm

Read More


560 Free Online Courses

Top 200 universities launched 500 free online courses.  Please find the list here .