Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello.

I am currently learning SQL on MySQL. Instructor teaches content by using cloud9, but as my boss suggests I should learn it on MySQL. This is the point that confuses me:

When course instructors writes something that generates warning (for example, not writing something when NOT NULL is written or writing char into a int variable) it generates warning but it also inserts data into table(it automatically writes 0 for both of the examples). However, whenever I write something that generates same error, MySQL doesn't write anything on table, not names, zeros, etc. It only generates errors.

I wonder if I'm doing something wrong or is it just difference between different compilers

What I have tried:

I tried to look up for internet :(
Posted
Comments
Richard Deeming 30-Aug-18 11:04am    
I'd say your instructor is doing something wrong. If you make a mistake, it's much better for the database to generate an error and make no changes, rather than inserting records with dubious "default" values.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900