If you are working on several tables within one
database, Sybase IQ allows multiple readers and writers in a database,
as long as the writers write to different tables.
- Connect to the demo database using connection
name marketing:
CONNECT DATABASE iqdemo
AS marketing
- Start a read/write transaction:
INSERT INTO FinancialCodes
(Code, Type, Description)
VALUES ('e9', 'expense', 'R & D')
- Connect to the same database using a different connection
name:
CONNECT DATABASE iqdemo
AS sales
- Start a read/write transaction using a different
table:
INSERT INTO SalesOrders
(ID, CustomerID, OrderDate, SalesRepresentative)
VALUES ('2088', '140', '05-29-98', '195')
COMMIT
This transaction will commit immediately because, although
both are in iqdemo database, the insert
operations affect different tables. For more details about transaction support, see System Administration Guide: Volume 1 > Transactions and Versioning.