Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server remove primary key without dropping table

IF EXISTS (SELECT * FROM sys.key_constraints
           WHERE type = 'PK' AND parent_object_id = OBJECT_ID('MyTable')
           AND Name = 'PK_MyTable')
    ALTER TABLE MyTable DROP CONSTRAINT PK_MyTable
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql ilike 
Sql :: mysql root permission denied lost 
Sql :: sql database connectivity 
Sql :: c# update sql statement 
Sql :: cast datetime to date in sql 
Sql :: user_dependencies 
Sql :: drop schema sql 
Sql :: sql download for windows 10 
Sql :: delete row by id mysql 
Sql :: sample clause in sql 
Sql :: find number of entries sql 
Sql :: get sum sqlite android 
Sql :: alter or change postgresql sequence counter 
Sql :: sql auto_increment syntax 
Sql :: declare table variable sql 
Sql :: /bin/sh: 1: mysql_config: not found 
Sql :: oracle session statistics 
Sql :: t-sql random number for each row 
Sql :: run function in sql 
Sql :: grant all privileges database postgres to user 
Sql :: postgresql change user role grant 
Sql :: sql inserted 
Sql :: json_value oracle 
Sql :: sql full outer join with where clause 
Sql :: select odd records sql 
Sql :: oracle error line 
Sql :: update sql sintax 
Sql :: sql insert into select 
Sql :: bigquery current time 
Sql :: how to check user grant in mysql 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =