473,385 Members | 2,180 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,385 software developers and data experts.

Drop Primary key constraint of (#) Hash

Hi there,

I have created a hash table. After using it, somehow the primary key
constraint of this hash table still exist in database. Which cause
error.

When I delete this constraint with Alter table Drop con....
It gives no table exist error.
Can anybody give any idea.

Thanks in Adv.,
T.S.Negi
Jul 20 '05 #1
2 6908
> I have created a hash table. After using it, somehow the primary key
constraint of this hash table still exist in database. Which cause
error.


I assume that by "hash table" you mean a temporary table? What makes you
think that the PK exists after the table is dropped? (Don't trust the output
of Enterprise Manager as that isn't always refreshed when you would expect
it to be) What error is caused and what is the code that produces the error?

--
David Portas
SQL Server MVP
--
Jul 20 '05 #2
ti********@mind-infotech.com (T.S.Negi) wrote in message news:<a1**************************@posting.google. com>...
Hi there,

I have created a hash table. After using it, somehow the primary key
constraint of this hash table still exist in database. Which cause
error.

When I delete this constraint with Alter table Drop con....
It gives no table exist error.
Can anybody give any idea.

Thanks in Adv.,
T.S.Negi


I don't quite understand your issue - this works fine for me:

create table #t (col1 int not null)
alter table #t add constraint PK_t primary key (col1)
alter table #t drop constraint PK_t
drop table #t

It would be best to post your version of MSSQL, the exact error
messages you get, as well as some explanation of why you believe the
constraint exists but the table doesn't.

Simon
Jul 20 '05 #3

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

Similar topics

10
by: BuddhaBuddy | last post by:
Platform is DB2/NT 7.2.9 The table was created like this: CREATE TABLE MYTEST ( MYTESTOID bigint not null primary key, FK_OTHEROID bigint not null references other, FK_ANOTHEROID bigint not...
13
by: Tibor | last post by:
I am using PostgreSQL 7.4.1 (only through psql) I know, that the command ALTER TABLE OFFICES DROP PRIMARY KEY (CITY); and its foreign key equivalent: ALTER TABLE SALESREPS DROP CONSTRAINT
3
by: peteh | last post by:
Hello All; Assuming a PMR is in order for this, but wanted to run by the group to see if anyone had similar experience. We just upgraded a DB2 V8 AIX (DPF) environment to FP10 from FP6 and have a...
0
kaleeswaran
by: kaleeswaran | last post by:
i know the forigen key table,but i forget the primary key table which it is refer the forigen key... so i want to know the query to find out the primary key table which refer the forigen key table...
1
by: abhu50 | last post by:
i have created table with unnamed check constraint so pl help me to drop this check constraint also about dropping the foreign key that is unnamed???????????
1
jamesd0142
by: jamesd0142 | last post by:
select 'ALTER TABLE ' + primary_table + ' drop CONSTRAINT ' + primary_key_name + ' FOREIGN KEY (' + foreign_column_1 + ')' from sysfkeys order by foreign_table How can I change this code to...
4
by: sanQUEST | last post by:
hi, can anybody can tell me how to add pry constraint to a table if it has already duplicated records ? san
6
by: Chandan Kr Sah | last post by:
How to drop primary key constraint from a column of table ? Actually I got so many example for this, but in that we require the primary key name also. But I dont have the primary key name.So if I...
2
by: Rohullah | last post by:
Hello I want to Drop a primary key Referenced to other foriegn key. I try the following method --------------------- alter table Stock drop constraint SYS_C005460; --------------------- But it...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.