Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Datenbanken (https://www.delphipraxis.net/15-datenbanken/)
-   -   Delphi SQL abfrage (https://www.delphipraxis.net/50433-sql-abfrage.html)

Gigant02 25. Jul 2005 20:27

Re: SQL abfrage
 
ach mensch natürlich was macht longtext eine (11)
macht ja auch keinen sinn

lach danke

lg, Gigant

jfheins 25. Jul 2005 20:29

Re: SQL abfrage
 
Zitat:

longtext(11)
was soll das werden ?

entweder longtext bzw. test oder so normal oder varchar (11) - das sind dann bis zu 11 Buchstaben ;)

Also @Airblader: Nein, hat's nicht ...

Airblader 25. Jul 2005 20:31

Re: SQL abfrage
 
@jfheins

Ich weiß schon, dass es keine Längenangabe hat, war mehr 'ne Fangfrage.

air

Gigant02 25. Jul 2005 20:32

Re: SQL abfrage
 
jup hab ich auch gemerkt

war echt dumm von mir

das kommt von str. - c :)

lg, Gigant

Sharky 25. Jul 2005 20:33

Re: SQL abfrage
 
Hai,

so würde das ganze für mySQL aussehen:
SQL-Code:
CREATE TABLE `posts` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `author` int(11) NOT NULL default '0',
  `date` date NOT NULL default '0000-00-00',
  `entry` text NOT NULL,
  `test` longtext NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
)
Wobei es keinen Sinn macht das Feld ID einmal als PK und noch einmal als einen Unique Schlüssel zu verwenden ;-)

Jelly 26. Jul 2005 08:47

Re: SQL abfrage
 
Zitat:

Zitat von Gigant02
SQL-Code:
CREATE TABLE posts( 
id int(11) DEFAULT '0' NOT NULL AUTO_INCREMENT,
author int(11) NOT NULL,
date datetime DEFAULT '0' NOT NULL AUTO_INCREMENT,
entry text,
test longtext(11),
UNIQUE id(id),
PRIMARY KEY (id)
);

Als eine DateTime Feld als AUTO_INCREMENT zu definieren ist aber auch nicht die feine Art. :zwinker:


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:00 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz