SQL Statement, Set Current Date, Set field to Unique
1. How do I set current date and time in the field
//Set the "Date Entered" field default value to the current date and time.
ALTER TABLE "tbl_ProblemReport" ALTER COLUMN "CreateDate" SET Default CURRENT_TIMESTAMP
2. How do I create a field in a table with that must be Unique?
//Set Unique Field for "ProblemReportID" in table "tbl_ProblemReport"
//No GUI can do this
ALTER TABLE "tbl_ProblemReport" ADD CONSTRAINT MYCONSTRAINT UNIQUE ("ProblemReportID");
Comments
Post a Comment