Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

create table

Empfohlene Antworten

Veröffentlicht

Hallo zusammen,

ich wollte gerade folgendes SQL Statement auf meine DB loslassen.


CREATE TABLE 'sw2lizenz'(

'sw2lizenznr'tinyint( 3 ) unsigned NOT NULL AUTO_INCREMENT ,
'f_snr'tinyint( 3 ) ,
'lizenz'varchar( 50 ) default '0',
PRIMARY KEY ( 'sw2lizenznr'),
KEY 'sw2lizenznr'( 'sw2lizenz' )
)
[/PHP]

Dabei habe ich folgende Fehlermeldung erhalten:

MySQL meldet:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''sw2lizenz'( 'sw2lizenznr'tinyint( 3 ) unsigned NOT NULL AU

Ich habe schon unter der Fehlernummer gesucht, das hat mich aber auch nicht weiter gebracht.

Was ist an diesem Statement falsch?

Danke korea1

CREATE TABLE sw2lizenz ( `sw2lizenznr` tinyint( 3 ) unsigned NOT NULL AUTO_INCREMENT ,
`f_snr` tinyint( 3 ) ,
`lizenz`varchar( 50 ) default '0',
PRIMARY KEY ( `sw2lizenznr`)
) [/PHP]

Das funktioniert bei mir, Mysql 4.02

Die Feldnamen sollten nicht in einfachen hochkommas sondern in Accents eingerahmt werde und was wolltest du mit dem 2.ten key befehl erreichen ??

[PHP]KEY 'sw2lizenznr'( 'sw2lizenz' )

Sollte das ein Fremdschlüssel werden ?

Warum setzt du die Feldnamen etc. überhaupt in Hochkommata, wenn ich fragen darf? Ist nicht unbedingt nötig..

ISt sogar ziemlich unnötig. Nur lästige schreibarbeit =)

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.