• No results found

!"# $ %& '( ! %& $ ' &)* + ! * $, $ (, ( '! -,) (# *&23. mysql> select * from from clienti;

N/A
N/A
Protected

Academic year: 2021

Share "!"# $ %& '( ! %& $ ' &)* + ! * $, $ (, ( '! -,) (# *&23. mysql> select * from from clienti;"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

!

"

#

$ %&

'

(

! %&

$

'

&)

*

+

!

*

$

,

$

( ,

(

'

! -

, )

(#

www.mysql.org

!

./

0

*&

2

3

!"

" "

!" #

$

mysql> select * from clienti;

(2)

4

5#' ,

!

INTEGER [(N)] [UNSIGNED]

$ -

6$

17

8

17

79

$ -

6:

1

79

$ . ;0 ' < '

'

! %

'

$ =

INTEGER

$ =

INTEGER UNSIGNED

$ =

INTEGER (8)

$ =

>

INTEGER (5) UNSIGNED

>

5#' ,

!

SMALLINT [(N)] [UNSIGNED]

$ -

6$

7>

8

7>

79

$ -

6:

7?

79

!

BIGINT [(N)] [UNSIGNED]

$ -

6$

?1

8

?1

79

$ -

6:

?4

79

!

BOOL

BOOLEAN

?

5#'

,-! -

DECIMAL [(N[,D])] [UNSIGNED]

$ -

'

'

$ @

.

' A 0

$ %,

7:

4

DECIMAL (10,4)

! B A -

FLOAT [(N,D)] [UNSIGNED]

DOUBLE [(N,D)] [UNSIGNED]

$ -

'

'

$ @

.' A 0

$ C

,

'

$

) , '' '

(3)

D

5#' ,

E

+

!

CHAR

$ (

!

+

+

CHAR (N)

$ .;0 "(

$ =

' .;0

'

!

+

+

*

)

VARCHAR (N)

$ .;0 "(

$ =

'

*

'

'

! "

#

# %

$ %,

'Una Stringa……'

5#' ,

EF

!

DATE $ C ‘YYYY-MM-DD’ $ - '1000-01-01' '9999-12-31'

! F

TIME $ C ‘HH:MM:SS’

!

8F

DATETIME $ C ‘YYYY-MM-DD HH:MM:SS’ $ - '1000-01-01 00:00:00' '9999-12-31 23:59:59‘

! F

TIMESTAMP $ C ‘YYYY-MM-DD HH:MM:SS’ $ - ‘1970-01-01 00:00:00' ‘2037-12-31 23:59:59‘

!

*

'

INTERVAL $ ; '' (#

,

E

!

CREATE SCHEMA nome-schema ;

!

(#

CREATE DATABASE [IF NOT EXISTS] db_name [spec

[,spec …] …] ;

$

+

)H

2

)

/

$

'

'

*

'

! =

(#

,

USE db_name ;

!

(#

,

(4)

7:

,

)

CREATE TABLE table_name (

NomeAttr1

tipoAttr1,

NomeAttr2

tipoAtt2,

… );

&

'

(

)

DROP TABLE table_name [IF EXISTS];

)

77

,%

'

)

create table Amici (

nome

varchar(30),

cognome

varchar(30),

soprannome

varchar(20),

numtelefono varchar(20),

email varchar(30));

Amici(Nome,Cognome,Soprannome,

NumTelefono,Email)

Amici(Nome,Cognome,Soprannome,

NumTelefono,Email)

*

%

*

7

,%

'

)

create table Amici (

nome

varchar(30) not null,

cognome

varchar(30) not null,

soprannome

varchar(20)

not null primary key,

numtelefono

varchar(20),

email varchar(30));

Amici(Nome,Cognome,Soprannome,

NumTelefono,Email)

Amici(Nome,Cognome,Soprannome,

NumTelefono,Email)

'

not null

(

+

'

primary key

(

,

(5)

71

,@

+

&

'

mysql> describe Amici;

+---+---+---+---+---+---+ | Field | Type | Null | Key | Default | Extra | +---+---+---+---+---+---+ | nome | varchar(30) | | | | | | cognome | varchar(30) | | | | | | soprannome | varchar(20) | | PRI | | | | numtelefono | varchar(20) | YES | | NULL | | | email | varchar(30) | YES | | NULL | | +---+---+---+---+---+---+ 5 rows in set (0.00 sec)

Amici(Nome,Cognome,Soprannome,

NumTelefono,Email)

Amici(Nome,Cognome,Soprannome,

NumTelefono,Email)

-

' . /- .

0

1

(

2 !"

))

74

,@

"$

)

'

(

,

3

%

create table Amici (

nome

varchar(30)

not null default ‘Sconosciuto’,

cognome

varchar(30)

not null default ‘Sconosciuto’,

soprannome

varchar(20)

not null primary key,

numtelefono

varchar(20),

email

varchar(30));

$

'

( '

(

'

#

(

#

4

$

, ' + *

5

,

$)

'

unique

(

create table Amici (

nome

varchar(30)

not null default ‘Sconosciuto’,

cognome

varchar(30)

not null default ‘Sconosciuto’,

soprannome

varchar(20)

not null primary key,

numtelefono

varchar(20) not null unique,

email

varchar(30));

(6)

7?

, ' + *

,

6

$ )

'

unique

(

create table Amici (

nome

varchar(30) not null,

cognome

varchar(30) not null,

soprannome

varchar(20) not null primary key,

numtelefono

varchar(20) not null unique,

email

varchar(30),

unique (nome,cognome) );

'

( '

#

(,

7D

,@

- #

#

$ )

'

references

(

#

Amici(Nome,Cognome,Soprannome,NumTelefono,Email) Amici(Nome,Cognome,Soprannome,NumTelefono,Email) Prestito(Soprannome,TitoloLibro,DataRestituzione) Prestito(Soprannome,TitoloLibro,DataRestituzione)

create table Amici (

nome varchar(30) not null, cognome varchar(30) not null,

soprannome varchar(20) not null primary key, numtelefono varchar(30) not null unique, email varchar(30));

create table Prestiti (

soprannome varchar (20) references Amici(soprannome), titololibro varchar (30) not null,

DataRest date not null, primary key (soprannome,titololibro));

7

,B

+

*

'7

(

'

(8

Amici(Nome,Cognome,Soprannome,NumTelefono,Email) Amici(Nome,Cognome,Soprannome,NumTelefono,Email) Prestito(Soprannome,TitoloLibro,DataRestituzione) Prestito(Soprannome,TitoloLibro,DataRestituzione)

! B

7,;

&'

no action

! B

,B '

&

cascade

$

I

'

! B

1,

*

;=

set null

$

* J

*

J

*

&

+

'K

! B

4,=

*

set default

$

* J

*

J

*

&

+

'K

(7)

7G

,B

+

*

'7

(

'

(8

Amici(Nome,Cognome,Soprannome,NumTelefono,Email) Amici(Nome,Cognome,Soprannome,NumTelefono,Email) Prestito(Soprannome,TitoloLibro,DataRestituzione) Prestito(Soprannome,TitoloLibro,DataRestituzione)

create table Prestiti ( soprannome varchar (20)

references Amici(soprannome) on delete politica on update politica,

titololibro varchar (30) not null, DataRest date not null, primary key (soprannome,titololibro));

:

,B

+

*

'7

(

'

(8

9

: ##

Amici(Nome,Cognome,Soprannome,NumTelefono,Email) Amici(Nome,Cognome,Soprannome,NumTelefono,Email) Prestito(Soprannome,TitoloLibro,DataRestituzione) Prestito(Soprannome,TitoloLibro,DataRestituzione)

create table Prestiti ( soprannome varchar (20)

references Amici(soprannome) on delete cascade on update cascade,

titololibro varchar (30) not null, DataRest date not null, primary key (soprannome,titololibro));

,@

'K

'

' ( ' # ( Amici(Nome,Cognome,NumTelefono,Email) Amici(Nome,Cognome,NumTelefono,Email) Prestito(Nome,Cognome,TitoloLibro,DataRestituzione) Prestito(Nome,Cognome,TitoloLibro,DataRestituzione)

create table Amici (

nome varchar(30) not null, cognome varchar(30) not null, numtelefono varchar(30) not null unique, email varchar(30),

primary key (nome,cognome)); create table Prestiti (

nome varchar(30) not null, cognome varchar(30) not null, titololibro varchar(30) not null, DataRest date not null, primary key (nome,cognome,titololibro),

(8)

,

'

J

!

' *

' .

J

0

! (#

''

A#L

.

H

0

!

'

J

*

+ *

create table Amici (

id_amico integer auto_increment unique,

nome varchar(30) not null, cognome varchar(30) not null, numtelefono varchar(30) not null unique, email varchar(30),

References

Related documents

Sebagai perwakilan mahasiswa, MPM-ST sudah semestinya berharap dapat Sebagai perwakilan mahasiswa, MPM-ST sudah semestinya berharap dapat menjadi kepercayaan dan menjadi pendamping

These are my solutions to problems given in Theodore Frankel’s book “The Ge- ometry of Physics” (second edition).. As I could not find any other sources, I do not know whether they

This study mainly focused on providing retailing business application using computerized system that enables businesses to track services and aims to provide

هعلاطم رد تحت ناراکمه و یمیحر ناونع &#34; یسررب ثأت لدم ری تبقارم ریگیپ رب بارطضا ،سرتسا یزیلایدومه نارامیب یگدرسفا و &#34; هب نیا یریگراک لدم ثأت نعم تبثم

NRF24L01 je bežični primopredajnik koji radi na frekvenciji od 2.4 GHz, ima najveću brzinu prijenosa od 2 Mbps te služi za komunikaciju između dva Arduino uređaja. Na Arduino

We analyzed the results of 230 patients who were (1) patho- logically confirmed to have NSCLC; (2) tested using the PD-L1 IHC 22C3, SP263, and SP142 methods; (3) evaluated for

The options on this tab depend on a table type selected in the Steel summary tables - style manager dialog. The example above displays the options available after selecting the

Based on some writings about the existence of mask performance in East Java, it can be concluded that there are 2 things associated with Wayang Topeng Jati Duwur which serves as