pastebin

Paste Search Dynamic
set vs select in sql server
  1. -- MySQL dump 10.13  Distrib 5.5.17, for Win32 (x86)
  2. --
  3. -- Host: localhost    Database: pmb19-20
  4. -- ------------------------------------------------------
  5. -- Server version       5.5.17
  6.  
  7. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  8. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  9. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  10. /*!40101 SET NAMES utf8 */;
  11. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  12. /*!40103 SET TIME_ZONE='+00:00' */;
  13. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  14. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  15. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  16. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  17. --
  18. -- Table structure for table `acc`
  19. --
  20. --
  21. -- Table structure for table `attributes`
  22. --
  23.  
  24. drop table IF exists `attributes`;
  25.  
  26. create table `attributes` (
  27.   `id` int(10) unsigned not null auto_increment,
  28.   `slug` varchar(255) collate utf8_unicode_ci not null,
  29.   `created_at` timestamp not null default '0000-00-00 00:00:00',
  30.   `updated_at` timestamp not null default '0000-00-00 00:00:00',
  31.   primary key (`id`),
  32.   unique KEY `attributes_slug_unique` (`slug`),
  33.   KEY `attributes_slug_index` (`slug`)
  34. ) ENGINE=innodb default charset=utf8 collate=utf8_unicode_ci;
  35.  
  36.  
  37. --
  38. -- Table structure for table `attribute_values`
  39. --
  40.  
  41. drop table IF exists `attribute_values`;
  42.  
  43. create table `attribute_values` (
  44.   `id` int(10) unsigned not null auto_increment,
  45.   `attribute_id` int(10) unsigned not null,
  46.   `entity_type` varchar(255) collate utf8_unicode_ci not null,
  47.   `entity_id` int(10) unsigned not null,
  48.   `value` mediumtext collate utf8_unicode_ci not null,
  49.   `created_at` timestamp not null default '0000-00-00 00:00:00',
  50.   `updated_at` timestamp not null default '0000-00-00 00:00:00',
  51.   primary key (`id`),
  52.   KEY `attribute_values_attribute_id_index` (`attribute_id`),
  53.   KEY `attribute_values_entity_type_index` (`entity_type`),
  54.   KEY `attribute_values_entity_id_index` (`entity_id`)
  55. ) ENGINE=innodb default charset=utf8 collate=utf8_unicode_ci;
Parsed in 0.014 seconds