Ch 12 - SQL Can't write to database pubs?
Ch 12 page 422. I can't insert the new authors. I get a an error:
The INSERT statement conflicted with the CHECK constraint "CK__authors__au_id__108B795B". The conflict occurred in database "pubs", table "dbo.authors", column 'au_id'.
The statement has been terminated.
hers the code I typed for the first insertion:
INSERT INTO authors
(au_id,au_lname,au_fname,phone,address,city,state, zip,contract)
VALUES
('111-22-333','Smitty','Briana','555 123-1234','123 Main St','Clemmons', 'NC', '27222',1)
Here's the results of the Constraint check I made:
CK__authors__au_id__108B795B ([au_id] like '[0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9]')
My code looks like it fits the bill to me. Could it be that I'm not authorized write access to the pubs database? Tried to check, but couldn't figure out how to even see that.
|