Link to home
Start Free TrialLog in
Avatar of ryan_sabarre
ryan_sabarre

asked on

creating tables

how can i create interbase table

can you correct this one.

   Query1.SQL.clear;
   Query1.SQL.Add('CREATE TABLE '+EMPRECORD+' (');
   Query1.SQL.Add('BADGENO CHAR(6),');
   Query1.SQL.Add('FIRSTNAME CHAR(50),');
   Query1.SQL.Add('MIDDLENAME CHAR(50),');
   Query1.SQL.Add('LASTNAME CHAR(50),');
   Query1.SQL.Add('BDATE TIMESTAMP,');
   Query1.SQL.Add('DEPARTMENT CHAR(70),');
   Query1.SQL.Add('PLANTNAME CHAR(50),');
   Query1.SQL.Add('SHIFTCODE CHAR(10),');
   Query1.SQL.Add('PICTURE CHAR(200))');
   Query1.ExecSQL;

   Query1.SQL.clear;
   Query1.SQL.Add('CREATE UNIQUE INDEX EMPRECORD_BADGENO');
   Query1.SQL.Add('ON '+EMPRECORD);
   Query1.SQL.Add('{"BADGENO"}');
   Query1.ExecSQL;


whats the error of my code?
how can i create indexes?
how can i make a 3 field unique?

can you give me a sample working codes please.

Avatar of ryan_sabarre
ryan_sabarre

ASKER

help me
ASKER CERTIFIED SOLUTION
Avatar of kacor
kacor
Flag of Hungary image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
2. how can i create indexes?
CREATE [UNIQUE] [ASC[ENDING] | DESC[ENDING]] INDEX index
ON table ( col1, col 2, ...);

sorry for the mistake

Janos

ryan_sabarre:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.