title: syntax error when creating FK and am I adding a picture from a user input in sql server correctly or there is another way
body: <pre><code>CREATE TABLE CHATTING(
  
                      CHATID      DECIMAL(10) IDENTITY NOT NULL PRIMARY KEY,
                      TEXTRCVD    VARCHAR(154) NOT NULL,
                      PARTYDATE   VARCHAR(154) NOT NULL /*REFERENCES CHATTING (CHATID)*/,
                      )
  
  CREATE TABLE PICS(
  
                      PICID           DECIMAL(10) IDENTITY NOT NULL PRIMARY KEY,
                      PIC             VARBINARY(MAX),
                      PIC_DATETIME    VARCHAR(154) NOT NULL /*REFERENCES PICS (PICID)*/,
                      )   
  
  /*CREATING PK AND FK*/
  
  ALTER Table CHATTING ADD 
  
                      FOREIGN KEY (PARTYDATE) REFERENCES (CHATID)
  
  ALTER TABLE PICS ADD
  
                      FOREIGN KEY (PIC_DATETIME) REFERENCES (PICID)
  
  
  INSERT INTO CHATTING (CHATID, TEXTRCVD, PARTYDATE)
  
  SELECT 1, 'TEST', BulckColumn
  
                              from OPENROWSET( BULK /*'SERVER'S EXTENSTION TO TAKE DATE FROM OR TO CONNECT WITH */, SINGLE_BLOB) AS IMAGE
  
  /*TO SEARCH FOR TEXT OR PICTURES*/
  
  SELECT * FROM CHATTING 
  
                        WHERE @USERSTART=CHATID;
  
  SELECT * FROM PICS
  
                      WHERE @USERSTART=PICID;
  </code></pre>