Logo  

CS479/579 - Web Programming II

Displaying ./code/SQL/user.sql

drop table if exists `user`;

create table `user` (
  `uid` 	int		auto_increment,
  `name`	varchar(64)	not null,
  `realname`	varchar(256)	not null default '',
  primary key (`uid`),
  index `name` (`name`)
) auto_increment=1000;

drop table if exists `passwd`;

create table `passwd` (
  `uid`		int		not null default 0 primary key,
  `passwd`	varchar(2048)	not null default '!'
);

insert into user (`uid`, `name`)
 values (1, 'root'), (10, 'operator');

insert into user (`name`, `realname`)
 values ('sbaker', 'Steve Baker'), ('foo', 'bar');

insert into `passwd` (`uid`, `passwd`)
 values
  (1, 'rootpw'),
  (10, 'operatorpw'),
  (1000, 'sbakerpw'),
  (1001, 'foopw');