IF EXISTS (
SELECT
*
FROM
sys.objects
WHERE
object_id = OBJECT_ID(N'A_CMD')
AND
type in (N'U')
) BEGIN
DROP TABLE A_CMD END
CREATE TABLE
A_CMD
(
A_NO VARCHAR(5) NOT NULL,
CREATED_BY VARCHAR(30),
CREATION_DATE DATETIME DEFAULT GETDATE()
);
CREATE UNIQUE
INDEX A_CMD_UNI_IDX ON A_CMD (A_NO);