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 events in classical reports?

882


What are the dynamic actions and how to configure it? : sap abap hr

862


What are th control break events in abap?

844


Give 3 scenario of reporting due to which you require reporting help of ABAP consultant?

1890


How to debug a sapscript?

840


How to upload more than 2GB file from External Source to SAP?

1084


What is the difference between a structure and a table?

774


What are the buffering options in abap?

809


What are the screen painter and menu painter?

786


How to Raise a Particular Ticket in Realtime ?

1982


Create any functions? How to go about it?

797


What is the transaction code to display the payroll results ? : abap hr

816


What is the maximum number of match code id's that can be defined for one match code object ?

750


What are the types of records that are transferred to sap r/3 and used by interfaces? : abap bdc

832


What are the Control levels in internal tables?

874