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

How table control cn be generated using bdc? : abap bdc

742


What is modularization and its benefits? : abap modularization

933


When the get cursor command used in interactive lists?

829


Select query optimisation

1111


please any one can tell me How to validate the data in Table maintinance generator?how can u validate the table field values if u r entering the data into fields .it shows record is wrong?wher we can done validation in table maitenance generator before getting the data as out ?

1809


What are the different types of internal table?

878


What are the functional modules used in sequence in bdc? : abap bdc

784


What is the difference between a pool table and a transparent table?

762


How many types of views are there ?

856


What is open sql?

800


What is interactive reporting?

833


What is the basic difference internal tables and database tables? : abap data dictionary

807


What is macro? : abap hr

843


Persistent class

1111


How is time management and payroll is integrated? : sap abap hr

766