Database - Introduction to SQL - Discussion

Discussion Forum : Introduction to SQL - General Questions (Q.No. 21)
21.
Which of the following do you need to consider when you make a table in SQL?
Data types
Primary keys
Default values
All of the above.
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
11 comments Page 1 of 2.

Rohan said:   4 years ago
You are right, agree @Ahmed.

Shubham telavane said:   4 years ago
Can anyone please explain why option (D)?

Because we make one table for particular department or employee we use datatype otherwise compiler cannot identify which type of data insert in table.

Natasha said:   5 years ago
Can anyone please explain to me why option (D) All of the above, why not option (A) Datatypes?

Yih said:   6 years ago
Making full table, all are valuable.

Priya said:   6 years ago
What is meant by default value in SQL?

Anonymous said:   6 years ago
I too agree with you @Dev.

Kamrujjaman said:   6 years ago
I agree with you @Dev.

Dev said:   10 years ago
Primary key and default values are optional. For creating table we need to consider the data type.

Ahmed said:   1 decade ago
But if we don't use primary keys and default values then also there is no problem in table creation. But data types must be provided prior.

Mahesh said:   1 decade ago
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.


Post your comments here:

Your comments will be displayed after verification.