Hello!
CREATE TABLE [dbo].[MSG]( [MSG_ID] [int] NOT NULL, [NAME] [int] NOT NULL, [USER_ID] [int] NOT NULL, CONSTRAINT [PK_MSG] PRIMARY KEY CLUSTERED ( [MSG_ID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] Also it is required to insert values into the table through select, but does not quit
I do this, but instead of MSG_ID I don’t know what to insert:
INSERT INTO [dbo].[MSG] ([MSG_ID], [NAME], [USER_ID]) SELECT [ЧТО СЮДА ?], [NAME], [USER_ID] FROM [dbo].[USERS] WHERE [dbo].[USERS].[DELETED] <> 1