如何使用sql使用以下规范创建区域表?

时间:2015-05-19 10:04:48

标签: sql database

如何使用以下规范创建表?请有人帮帮我。特别是最小和最大约束。

表名:区域

var module = angular.module('app', ['onsen']);
var params = {msg:""};//define a global object

module.controller('ctrl', function($scope){
  $scope.setParam = function (msg) {
      params.msg = msg;//set the options you want in the object
      menu.setMainPage('page1.html', {closeMenu: true});//change the page
  }
});
module.controller("page1ctrl" function($scope){
   var options = params.msg; // this will give you the options you set earlier
});

1 个答案:

答案 0 :(得分:0)

ANSI SQL回答:

create table areas
(id      int         Primary Key,
 name    varchar(40) Not Null check(length(name) >= 3),
 do_id   int         references division_offices,
 pincode int         not null check(pincode between 100000 and 999999)
)