<stat>CREATE TABLE IF NOT EXISTS `xsta_ortsliste` (
  `sta_ortsliste_id` int(11) NOT NULL AUTO_INCREMENT,
  `Gemeinde_kennziffer` varchar(5) NOT NULL,
  `Gemeindename` varchar(45) DEFAULT NULL,
  `Ortschaft_kennziffer` varchar(5) DEFAULT NULL,
  `Ortschaftsname` varchar(45) DEFAULT NULL,
  `Postleitzahl` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`sta_ortsliste_id`)
) ENGINE=InnoDB AUTO_INCREMENT=17062 DEFAULT CHARSET=utf8;
<stat>DELETE FROM `xsta_ortsliste`;

<stat>CREATE TABLE `xsta_ortsliste_ges` (
	`sta_ortsliste_id` INT(11) NOT NULL,
	`Gemeinde_kennziffer` VARCHAR(5) NOT NULL COLLATE 'utf8_general_ci',
	`Gemeindename` VARCHAR(45) NULL COLLATE 'utf8_general_ci',
	`Ortschaft_kennziffer` VARCHAR(5) NULL COLLATE 'utf8_general_ci',
	`Ortschaftsname` VARCHAR(45) NULL COLLATE 'utf8_general_ci',
	`Postleitzahl` VARCHAR(25) NULL COLLATE 'utf8_general_ci'
) ENGINE=MyISAM;

<stat>CREATE TABLE IF NOT EXISTS `xsta_ortsliste_wien` (
  `sta_ortsliste_id` int(11) NOT NULL AUTO_INCREMENT,
  `Gemeinde_kennziffer` varchar(5) NOT NULL,
  `Gemeindename` varchar(45) DEFAULT NULL,
  `Ortschaft_kennziffer` varchar(5) DEFAULT NULL,
  `Ortschaftsname` varchar(45) DEFAULT NULL,
  `Postleitzahl` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`sta_ortsliste_id`)
) ENGINE=InnoDB AUTO_INCREMENT=90024 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

<stat>DELETE FROM `xsta_ortsliste_wien`;
<stat>INSERT INTO `xsta_ortsliste_wien` (`sta_ortsliste_id`, `Gemeinde_kennziffer`, `Gemeindename`, `Ortschaft_kennziffer`, `Ortschaftsname`, `Postleitzahl`) VALUES
	(1, '10101', 'Eisenstadt', '00001', 'Eisenstadt', '7000'),
	(90001, '90001', 'Wien', NULL, 'Wien  1.,Innere Stadt', '1010'),
	(90002, '90002', 'Wien', NULL, 'Wien  2.,Leopoldstadt', '1020'),
	(90003, '90003', 'Wien', NULL, 'Wien  3.,Landstraße', '1030'),
	(90004, '90004', 'Wien', NULL, 'Wien  4.,Wieden', '1040'),
	(90005, '90005', 'Wien', NULL, 'Wien  5.,Margareten', '1050'),
	(90006, '90006', 'Wien', NULL, 'Wien  6.,Mariahilf', '1060'),
	(90007, '90007', 'Wien', NULL, 'Wien  7.,Neubau', '1070'),
	(90008, '90008', 'Wien', NULL, 'Wien  8.,Josefstadt', '1080'),
	(90009, '90009', 'Wien', NULL, 'Wien  9.,Alsergrund', '1090'),
	(90010, '90010', 'Wien', NULL, 'Wien 10.,Favoriten', '1100'),
	(90011, '90011', 'Wien', NULL, 'Wien 11.,Simmering', '1110'),
	(90012, '90012', 'Wien', NULL, 'Wien 12.,Meidling', '1120'),
	(90013, '90013', 'Wien', NULL, 'Wien 13.,Hietzing', '1130'),
	(90014, '90014', 'Wien', NULL, 'Wien 14.,Penzing', '1140'),
	(90015, '90015', 'Wien', NULL, 'Wien 15.,Rudolfsheim-Fünfhaus', '1150'),
	(90016, '90016', 'Wien', NULL, 'Wien 16.,Ottakring', '1160'),
	(90017, '90017', 'Wien', NULL, 'Wien 17.,Hernals', '1170'),
	(90018, '90018', 'Wien', NULL, 'Wien 18.,Währing', '1180'),
	(90019, '90019', 'Wien', NULL, 'Wien 19.,Döbling', '1190'),
	(90020, '90020', 'Wien', NULL, 'Wien 20.,Brigittenau', '1200'),
	(90021, '90021', 'Wien', NULL, 'Wien 21.,Floridsdorf', '1210'),
	(90022, '90022', 'Wien', NULL, 'Wien 22.,Donaustadt', '1220'),
	(90023, '90023', 'Wien', NULL, 'Wien 23.,Liesing', '1230');

<stat>DROP TABLE IF EXISTS `xsta_ortsliste_ges`;
<stat>CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `xsta_ortsliste_ges` AS select `xsta_ortsliste`.`sta_ortsliste_id` AS `sta_ortsliste_id`,`xsta_ortsliste`.`Gemeinde_kennziffer` AS `Gemeinde_kennziffer`,`xsta_ortsliste`.`Gemeindename` AS `Gemeindename`,`xsta_ortsliste`.`Ortschaft_kennziffer` AS `Ortschaft_kennziffer`,`xsta_ortsliste`.`Ortschaftsname` AS `Ortschaftsname`,`xsta_ortsliste`.`Postleitzahl` AS `Postleitzahl` from `xsta_ortsliste` union select `xsta_ortsliste_wien`.`sta_ortsliste_id` AS `sta_ortsliste_id`,`xsta_ortsliste_wien`.`Gemeinde_kennziffer` AS `Gemeinde_kennziffer`,`xsta_ortsliste_wien`.`Gemeindename` AS `Gemeindename`,`xsta_ortsliste_wien`.`Ortschaft_kennziffer` AS `Ortschaft_kennziffer`,`xsta_ortsliste_wien`.`Ortschaftsname` AS `Ortschaftsname`,`xsta_ortsliste_wien`.`Postleitzahl` AS `Postleitzahl` from `xsta_ortsliste_wien`;

