I'm trying to write a small SQL Script to run using TSQL -i <scriptName>
I'd like to add some comments in the script but so far I've been unable to find the right syntax.
I tried the /* */, //, #, ' and others, but no luck.
Does TSQL support comments in the scripts?
Thanks Mark.
I'm so used to MS SQL that I didn't even know the double dash was the standard.
One more question about my script: I'm trying to set a foreign key reference between 2 tables.
I have
CREATE TABLE A
(
fieldA
CHAR(40)
NOT NULL
PRIMARY KEY
);
CREATE TABLE B
(
fieldB
INTEGER
NOT NULL,
refA
CHAR(40)
NOT NULL
REFERENCES A(fieldA)
);
But if I execute:
insert into B values (4, 'xxx');
an entry gets created where I was expecting Texis to throw an error because of the Foreign key constraint.
What am I doing wrong?