Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6954839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:39:32+00:00 2026-05-27T14:39:32+00:00

DROP TABLE District_Info; CREATE TABLE District_Info( Dname VARCHAR2(20) primary key, Boundary_dist VARCHAR2(20) ); for

  • 0
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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:39:33+00:00Added an answer on May 27, 2026 at 2:39 pm

    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:

    CREATE TABLE District_Info(
    Dname VARCHAR2(20) primary key,
    Boundary_dist VARCHAR2(20) 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:

    CREATE TABLE District_Info(
    Dname VARCHAR2(20) primary key,
    Other_info VARCHAR2(20)
    );
    
    CREATE TABLE District_Boundary(
    Dname VARCHAR2(20) primary key,
    Boundary_dist VARCHAR2(20) primary key);
    

    If you really insist on storing more that one value per row, you can use a user-defined datatype:

    create type varchar_20_list as table of varchar2(20);
    
    CREATE TABLE District_Info(
    Dname VARCHAR2(20) primary key,
    Boundary_dist varchar_20_list);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

DROP TABLE IF EXISTS student; CREATE TABLE student( bannerid VARCHAR(9) PRIMARY KEY NOT NULL
I have a testdata like this: DROP TABLE SELECT_PASS; CREATE TABLE SELECT_PASS(ID INT(20),TESTCASE VARCHAR(20),RESULT
Rather than create, and then drop a table in sqlite3, I would like to
This is my Create table script: DROP TABLE IF EXISTS `wp_beats`; CREATE TABLE .`wp_beats`
i have this: DROP TABLE IF EXISTS `sf_guard_user`; CREATE TABLE `sf_guard_user` ( `id` INTEGER(11)
Here's some sample code: if object_id('tempdb..#TempList') is not null drop table #TempList create table
Based on some googling I came up with this: drop table #temp create table
This is what I have: drop table ttemp create table ttemp( col1 char(10), col2
Here is my create table and this is the error I am getting DROP
I am trying to create a function that does this: drop table t_rv_openitem; select

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.