Skip to content
Advertisement

Tag: sql-insert

INSERT SELECT statement with only one column for SELECT

I’m using SQL Server Management Studio 18 and I’ve got the following tables with the following columns: TableA TableB I want to do an INSERT SELECT into TableB, maybe something like the following: Basically, I just want to make an INSERT SELECT where I’m grabbing a column from another table (InternalEmplID), and then for the other columns (Month and Year),

How to remove check constraint?

I am having difficult to remove CHECK using Alter in sql. Can anyone help me please? Answer Oracle does have an alter table … drop constraint syntax for this. But since you created an anonymous constraint, so this is tricky – because you don’t know the name of the constraint. One option is to use dynamic SQL to retrieve the

Advertisement