Example:- unload to customer.unl select * from customer
where cs_src_appl_name='RBS';
3. How to use Joins in Informix?
Ans:
SELF JOIN:
Joining a table with itself is a self-join.
Example:-
SELECT A.Name, B.Name
FROM SalesReps A, SalesReps B
WHERE A.Mgr = B.Empl_Num;
INNER JOINS:
An inner join between two (or more) tables is the Cartesian product that satisfies the join condition in the WHERE clause.
Example:-
SELECT O.City, S. Name
FROM Offices O, SalesReps S
WHERE O.Mgr = S.Mgr;
OUTER JOINS
To select all unmatched rows from A, the syntax is
SELECT A.Column1, B.Column2
FROM A LEFT JOIN B
ON A.Column2= B.Column2
To select all unmatched rows from B, the syntax is
SELECT A.Column1, B.Column2
FROM A RIGHT JOIN B
ON A.Column2= B.Column2
4. How do I create schema from existing informix database?
Ans:
Use command :-
dbschema -d >cdb.sql
Example:-
dbschema -d cdb_database_name >cdb.sql
5.How do I create database from schema?
Ans:
Use command :-
create database in with buffered log;
Example:-
create database cdb2 in dev_data_dbs with buffered log;
6. How do I Set the Buffered log?
Ans:
Use command :-
create database in with buffered log;
Example:-
create database cdb2 in dev_data_dbs with buffered log;