<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic simple question...mysql+unique in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-question-mysql-unique/m-p/3820399#M780897</link>
    <description>Helooo,&lt;BR /&gt;&lt;BR /&gt;I have table like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CREATE TABLE `actions` (&lt;BR /&gt;`id` INT NOT NULL AUTO_INCREMENT ,&lt;BR /&gt;`date` INT NOT NULL ,&lt;BR /&gt;`time` INT NOT NULL ,&lt;BR /&gt;`comp` VARCHAR( 10 ) NOT NULL ,&lt;BR /&gt;`target` VARCHAR( 20 ) NOT NULL ,&lt;BR /&gt;`action` VARCHAR( 100 ) NOT NULL ,&lt;BR /&gt;PRIMARY KEY ( `id` ) ,&lt;BR /&gt;UNIQUE (`id`)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also I have some data in that table but unique field is just id..I have some duplicated data there and I would like to have table like this:&lt;BR /&gt;&lt;BR /&gt;CREATE TABLE `actions` (&lt;BR /&gt;`id` INT NOT NULL AUTO_INCREMENT ,&lt;BR /&gt;`date` INT NOT NULL ,&lt;BR /&gt;`time` INT NOT NULL ,&lt;BR /&gt;`comp` VARCHAR( 10 ) NOT NULL ,&lt;BR /&gt;`target` VARCHAR( 20 ) NOT NULL ,&lt;BR /&gt;`action` VARCHAR( 100 ) NOT NULL ,&lt;BR /&gt;PRIMARY KEY ( `id` ) ,&lt;BR /&gt;UNIQUE (`id`) ,&lt;BR /&gt;UNIQUE (`time`)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;so in this case it would not allow insert records with a same time value..&lt;BR /&gt;&lt;BR /&gt;is there a way other then to drop and create again table and new insert..??&lt;BR /&gt;&lt;BR /&gt;any ideas??</description>
    <pubDate>Mon, 10 Jul 2006 05:20:22 GMT</pubDate>
    <dc:creator>amonamon</dc:creator>
    <dc:date>2006-07-10T05:20:22Z</dc:date>
    <item>
      <title>simple question...mysql+unique</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-question-mysql-unique/m-p/3820399#M780897</link>
      <description>Helooo,&lt;BR /&gt;&lt;BR /&gt;I have table like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;CREATE TABLE `actions` (&lt;BR /&gt;`id` INT NOT NULL AUTO_INCREMENT ,&lt;BR /&gt;`date` INT NOT NULL ,&lt;BR /&gt;`time` INT NOT NULL ,&lt;BR /&gt;`comp` VARCHAR( 10 ) NOT NULL ,&lt;BR /&gt;`target` VARCHAR( 20 ) NOT NULL ,&lt;BR /&gt;`action` VARCHAR( 100 ) NOT NULL ,&lt;BR /&gt;PRIMARY KEY ( `id` ) ,&lt;BR /&gt;UNIQUE (`id`)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also I have some data in that table but unique field is just id..I have some duplicated data there and I would like to have table like this:&lt;BR /&gt;&lt;BR /&gt;CREATE TABLE `actions` (&lt;BR /&gt;`id` INT NOT NULL AUTO_INCREMENT ,&lt;BR /&gt;`date` INT NOT NULL ,&lt;BR /&gt;`time` INT NOT NULL ,&lt;BR /&gt;`comp` VARCHAR( 10 ) NOT NULL ,&lt;BR /&gt;`target` VARCHAR( 20 ) NOT NULL ,&lt;BR /&gt;`action` VARCHAR( 100 ) NOT NULL ,&lt;BR /&gt;PRIMARY KEY ( `id` ) ,&lt;BR /&gt;UNIQUE (`id`) ,&lt;BR /&gt;UNIQUE (`time`)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;so in this case it would not allow insert records with a same time value..&lt;BR /&gt;&lt;BR /&gt;is there a way other then to drop and create again table and new insert..??&lt;BR /&gt;&lt;BR /&gt;any ideas??</description>
      <pubDate>Mon, 10 Jul 2006 05:20:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-question-mysql-unique/m-p/3820399#M780897</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2006-07-10T05:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: simple question...mysql+unique</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-question-mysql-unique/m-p/3820400#M780898</link>
      <description>Hi,&lt;BR /&gt;have you tried:&lt;BR /&gt;alter table actions drop primary key;&lt;BR /&gt;alter table actions add primary key unique id, unique time;</description>
      <pubDate>Mon, 10 Jul 2006 05:55:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-question-mysql-unique/m-p/3820400#M780898</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-07-10T05:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: simple question...mysql+unique</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-question-mysql-unique/m-p/3820401#M780899</link>
      <description>welll firs command passed but second did not...&lt;BR /&gt;&lt;BR /&gt;any ideas????</description>
      <pubDate>Mon, 10 Jul 2006 06:33:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-question-mysql-unique/m-p/3820401#M780899</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2006-07-10T06:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: simple question...mysql+unique</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-question-mysql-unique/m-p/3820402#M780900</link>
      <description>O well I dropped table and I created it again and insert data in it..&lt;BR /&gt;</description>
      <pubDate>Mon, 10 Jul 2006 06:47:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-question-mysql-unique/m-p/3820402#M780900</guid>
      <dc:creator>amonamon</dc:creator>
      <dc:date>2006-07-10T06:47:39Z</dc:date>
    </item>
  </channel>
</rss>

