1. I have a table "students" with id, fname, mname, and lname columns. The 'mname' column can accept NULL.
The Submit button on the form was clicked a number of times, and because there was no input validation, I have records with nothing for fname and lname, and NULL for mname. I want to prune the table of these empty records.
I can delete records with no lname, but how would I test for empty? It's not NULL -- just empty. I was expecting the INSERT to return an error if a column doesn't accept NULL...
2. Also, can column properties be changed? For example, can I make a column that doesn't accept NULL to start accepting NULL? Can I add or remove other properties for an existing column? I am not sure how to plan a database, so I want to be able to alter it as the need arises. Will it always require making a new column and deleting the old one?
3. Is there a short tutorial or guide that helps plan for a database. The are a ton that help you create a simple basic DB, but I'm looking for one that will help me plan one right the first time.
Thanks
The Submit button on the form was clicked a number of times, and because there was no input validation, I have records with nothing for fname and lname, and NULL for mname. I want to prune the table of these empty records.
I can delete records with no lname, but how would I test for empty? It's not NULL -- just empty. I was expecting the INSERT to return an error if a column doesn't accept NULL...
2. Also, can column properties be changed? For example, can I make a column that doesn't accept NULL to start accepting NULL? Can I add or remove other properties for an existing column? I am not sure how to plan a database, so I want to be able to alter it as the need arises. Will it always require making a new column and deleting the old one?
3. Is there a short tutorial or guide that helps plan for a database. The are a ton that help you create a simple basic DB, but I'm looking for one that will help me plan one right the first time.
Thanks