Answers for "constraint sql server"

SQL
0

sql server create constraint

ALTER TABLE my_table ALTER COLUMN [Name] VARCHAR(50) NOT NULL;
ALTER TABLE my_table ADD CONSTRAINT UQ__Constrai UNIQUE (ID);
ALTER TABLE my_table ADD PRIMARY KEY (ID);
-- Get constraints names
SELECT CONSTRAINT_NAME,
     TABLE_SCHEMA ,
     TABLE_NAME,
     CONSTRAINT_TYPE
     FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
   WHERE TABLE_NAME='my_table';
ALTER TABLE my_table DROP CONSTRAINT PK__Constrai__xxxxx;
Posted by: Guest on April-17-2021
1

constraint sql

create table etc(
  numeric (4) anything constraint Gives_name_to_a_restriction primary key);
Posted by: Guest on February-10-2021

Code answers related to "constraint sql server"

Code answers related to "SQL"

Browse Popular Code Answers by Language