473,396 Members | 2,108 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to make a column at column no X, a primary key

Hi All,

Do u know how to make 22nd column a primary key if there is a table of
100 columns and you don't know the names of the columns?

If u do know plz reply ASAP…

Prabodh
Jul 19 '05 #1
1 2692
"Prabodh" <pr************@rediffmail.com> wrote in message
news:c5**************************@posting.google.c om...
Hi All,

Do u know how to make 22nd column a primary key if there is a table of
100 columns and you don't know the names of the columns?

If u do know plz reply ASAP.

Prabodh


Pradodh,

The DESCRIBE command in SQL*Plus tells you the names of the columns for a
table.

You can also use the data dictionary view, USER_TAB_COLUMNS, to find the
name of the 22nd column of a table. Use the COLUMN_ID column of that view
to find the order that the column was created in.

Douglas Hawthorne
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Ken1 | last post by:
I am going to drop a primary key from one column and create a new column to be used as primary key in an existing database. The old column was a date column which someone earlier though was a good...
4
by: Peter Scott | last post by:
I created a table that has a column in that needs to contain a full Unix file path. Since 2048 was too long for a VARCHAR, I made it TEXT. I since populated the table. Now I want to make the...
10
by: deko | last post by:
I understand it's possible to make a composite Primary Key by holding down the control key and selecting multiple fields, then right-clicking and selecting Primary Key. But I've heard that's not a...
6
by: Alpha | last post by:
I retrieve a table with only 2 columns. One is a auto-generated primary key column and the 2nd is a string. When I add a new row to the dataset to be updated back to the database. What should I...
11
by: Martin | last post by:
Hi, I understand you must first remove the constraint. The following bit does not work (where t is a DataTable). It gives a 'reference not set to an object' error ...
3
by: travlintom | last post by:
Hi all. I have a datagrid that has several columns including the Primary Key as the first column. When I add records to the grid the Primary Key column show "Null". This would not be a...
8
by: Sonny | last post by:
Hi, I don't know if I missed anything. I have 2 member tables and one partition view in SQL 2000 defined as following CREATE VIEW Server1.dbo.UTable AS SELECT * FROM Server1..pTable1...
0
by: Prabodh | last post by:
Hi All, Do u know how to make 22nd column a primary key if there is a table of 100 columns and you don't know the names of the columns? If u do know plz reply ASAP… Prabodh
3
by: Ken Fine | last post by:
This is a question that someone familiar with ASP.NET and ADO.NET DataSets and DataTables should be able to answer fairly easily. The basic question is how I can efficiently match data from one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.