创建表的语句
IF EXISTS
(
SELECT *
FROM sys.tables
WHERE SCHEMA_NAME(schema_id) ='dbo'
AND name ='MyTable0'
)
DROP TABLE [dbo].[MyTable0];
GO
create TABLE [dbo].[MyTable0]{
ID BIGINT NOT NULL PRIMARY KEY;
};
创建序列的语句
IF EXISTS
(
SELECT *
FROM sys.sequences
WHERE SCHEMA_NAME(schema_id) ='dbo'
AND name = 'Sequence_Name''
)
drop SEQUENCE [dbo].[Sequence_Name]
GO
CREATE SEQUENCE [dbo].[Sequence_Name]
AS [bigint]
START WITH 1
INCREMENT BY 1
MINVALUE 1
MAXVALUE 9223372036854775807
CACHE 3