示例#1
0
        internal static void Run2()
        {
            var db = new SQLDatabase
            {
                DatabaseName = "Humans"
            };

            db.DropTable("People");
            db.DropDatabase("Humans");

            db.CreateDatabase("Humans", true);

            db.CreateTable("People", @"
                            ID int NOT NULL Identity (1,1),
                            lastName varchar(255),
                            firstName varchar(255),
                            address varchar(255),
                            city varchar(255),
                            shoeSize int
                            ");
            db.AlterTable("People", "ADD age int;");
            db.AlterTableDrop(field: "shoeSize", name: "People");
        }
示例#2
0
 public static void CreateDatabase()
 {
     db.CreateDatabase("Animals");
 }