DROP TABLE District_Info;
CREATE TABLE District_Info(
Dname VARCHAR2(20) primary key,
Boundary_dist VARCHAR2(20)
);
for this code, for each Dname there are more than one Boundary_dist. it would be better if i could use an array of varchar2(20) and insert as much boundary_dist as i need to. want some helpful suggestions.
As already mentioned, the ideal way to do this would be to store an additional row for each DName/Boundary_Dist combination. The simplest way to do with a structure this simple is to just change your primary key:
If you’re going to need other data in that table that has a 1:1 correlation to District, you would be better off splitting BoundayDist into a separate table:
If you really insist on storing more that one value per row, you can use a user-defined datatype: