Introduction to SQL

Q1: Which of the following do you need to consider when you make a table in SQL?

A Data types

B Primary keys

C Default values

D All of the above.

ANS:D - All of the above.

Because if there null values. When calculating the column values.

If there is null then the total will be '0'.

(anything + null = 0).

If we use default value '0' at integer column.

If we not specified the value then the 0 will be inserted in that column.

Then the total result will be correct. And also for char column it changes default. That if we don't know a person name. Instead of leaving it null. If we put default as 'not specified' then 'not specified' will be inserted in column. And so on.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.