Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m having issue writing a script in MySQL, on one of my tables I have a colum

ID: 3699139 • Letter: I

Question

I'm having issue writing a script in MySQL, on one of my tables I have a colum that has intergers with leading '0's. I've attached an image and I'm not sure what I am doing incorrectly.

Above is the Table that I am creating

Above is what I've written so far, I'm not sure why the first statement doesn't have any red squiggly line. If I remove the single quotes there still are squiggly line in front of the leading '0'

Any suggestions?

Create Table Book (ISBN nvarchar(13) Not Null primary key, Title nvarchar(50) Null, Author nvarchar30) Null, l4??????.hiher nvarchar(30) Null Subiect Code varchar(3) Null Referenc Shelf_Location nvarchar(7) Null, Fiction bit Null); es subject (Subject C ode

Explanation / Answer

The problem is ISBN number of the second record has ' inbetween. Please compare it with the first record. ISBN in nvarchar type and like the first record the entire ISBN should be with in single quote like '0-15-500139-6'.

Since single quote is used to wrap the character, varchar and nvarchar type there should not be any single quote inbetween. So please relace '0'-'15'-'500139'-'6' with '0-15-500139-6'

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote