Can we create a Table Without a Primary key?

Answer Posted / vivek kikaan

Who says it cannot be created. I just created 1 in MySQL.


mysql> create table DUMMY_TABLE(id INT NOT NULL,    first_name VARCHAR(20) default NULL,    last_name  VARCHAR(20) default NULL,    salary     INT  default NULL);
Query OK, 0 rows affected (0.12 sec)

mysql> desc DUMMY_TABLE;
+------------+-------------+------+-----+---------+-------+
| Field      | Type        | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| id         | int(11)     | NO   |     | NULL    |       |
| first_name | varchar(20) | YES  |     | NULL    |       |
| last_name  | varchar(20) | YES  |     | NULL    |       |
| salary     | int(11)     | YES  |     | NULL    |       |
+------------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql>

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the difference between tables and structures? : abap data dictionary

672


Of the two call transaction and session method, which is faster?

718


Which transaction code can I use to analyze the performance of abap program?

574


What is an abap instance?

627


What are the different types of the sap abap data dictionary objects?

564






Can i know some of the Realtime tickets that anyone has been faced ?

1675


What happens Update command is used without where clause ?

640


Can I execute user exits? If yes, how?

607


What does an exec sql statement do in abap?

560


What is processing class, where we do them and why? : sap abap hr

593


What is the differences between structure and table in data dictionary in abap?

595


how can you display data say "your name"in sap script without print program or driver program??

1737


There is a delivery that is being created through the ABAP code and in the middle it says delivery created but someone is modifying , how would you rectify this issue

7624


What are your ways to performance optimization?

931


Explain what are standard layouts sets in the sap script?

956