I am trying to work on my own path.
Writer MS SQL I want to follow the tutorial using MySQL. I am not completely sure how to translate MS SQL scripts you will see below as "Identity", "Construct", and "Cluster":
Make the table [event_person] ([Event_ID] [int] tap, [person_id] [int] answer, contract [pk_evant_] primary key class ([event_id] ASC, [enabled_ID] ASC) [Events ] ([ID] [IN [AD] [TARN] [ET] identity (1, 2, 2, 2) 1) No, tap, [name] [varchar] (50) No, Consortent [PK_ folk] Primary key class ([ID] ASC))I can get:
create table event_ person (event_ id not note main agreement, insurance indent not note); create table events (aa Ed DotTime Nouel, Name Encryption (50) Null); Create Table People (id It Not, Outangent Primary Key, Name Enrollment (50) Noel);
... but I'm worried that the resulting code will result in lost functionality and incompatibility with the rest of the tutorial.
Is there any better way I should write this?
The primary key for the event_person
tables is equivalent to two scripts. The example of SQL Server is using an overall primary key, made up of two fields. This column can not be defined in the specification, so we have to use a different primary key
section:
create tab 'event_person` (`event_id`) integer Not, `Person_id` is not complete, primary key (` event_id`, `person_id`));
Also note that there is no data type in MySQL, you will need to use it:
create tab 'events' (`id`) INd Faucet Primary Key ATOnEcramement, `DT` daytime,` name 'varchar (50) character set ucs2); In addition, note that in the above example we have not given the names of the primary key constraints. Although this is probably irrelevant, you may want to name it as follows: create tab 'event_ person' (`event_id` is not an integer, 'person_id' is not, contract 'pk_event_person' primary key (`Event_id`,` person_id`)); Tablet `Event` (` id`inert faucet autacacarmt, dtt dtttm, 'name' code (50) typeer set UC2, contractile 'pk_event' primary key (`id`););
Comments
Post a Comment