<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MySql ed auto increment]]></title><description><![CDATA[<p dir="auto">Ciao a tutti,<br />
sono nuovissimo di MYSQL e sto cercando di creare alcuni db transazionali di esempio.<br />
Vorrei creare una tabella con il seguente script:</p>
<pre><code>CREATE TABLE mytable&amp;#40;
  myname VARCHAR&amp;#40;45&amp;#41; NOT NULL,
  myid INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  PRIMARY KEY&amp;#40;myname&amp;#41;
&amp;#41;
TYPE=InnoDB;
</code></pre>
<p dir="auto">Nel creare la tabella mi viene restituito l'errore</p>
<blockquote>
<p dir="auto">ERROR 1075 (42000):<br />
Incorrect table definition; there can be only one auto<br />
column and it must be defined as a key</p>
</blockquote>
<p dir="auto">In Mysql non è proprio possibile creare una tabella con un campo autoincrement che non sia anche primary key?</p>
<p dir="auto">Grazie mille<br />
gg8one</p>
]]></description><link>https://dev.connect.gt/topic/13101/mysql-ed-auto-increment</link><generator>RSS for Node</generator><lastBuildDate>Mon, 30 Nov 2026 23:57:08 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/13101.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Jul 2006 17:56:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MySql ed auto increment on Mon, 03 Jul 2006 19:05:37 GMT]]></title><description><![CDATA[<p dir="auto">Prova così</p>
<pre><code>CREATE TABLE `mytable` &amp;#40;
  `myname` varchar&amp;#40;45&amp;#41; NOT NULL default '',
  `myid` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, default '',
  PRIMARY KEY &amp;#40;`myname`&amp;#41;
&amp;#41;
TYPE=InnoDB;
</code></pre>
]]></description><link>https://dev.connect.gt/post/341998</link><guid isPermaLink="true">https://dev.connect.gt/post/341998</guid><dc:creator><![CDATA[il.rappo]]></dc:creator><pubDate>Mon, 03 Jul 2006 19:05:37 GMT</pubDate></item></channel></rss>