You need output right?

|
Candoitnow001 2022-08-01 20:50:33
Code 1064
Candoitnow001 2022-08-01 20:50:40
Syntax error
Swapnil 2022-08-01 20:50:51
Send screenshot
Candoitnow001 2022-08-01 20:51:00
I’m beginning level of learning mysql
Candoitnow001 2022-08-01 20:51:07
Ok ill share it
Swapnil 2022-08-01 20:51:37
paste this code here
Candoitnow001 2022-08-01 20:54:43
mysql_en-23406.jpg

Candoitnow001 2022-08-01 20:55:04
Again it shows 1064
Candoitnow001 2022-08-01 20:57:10
Hello Swapnil r u in online
Candoitnow001 2022-08-01 21:12:10
Thank you for responses Swapnil and V
Vchoudhary12 2022-08-01 21:12:37
Did you get required ?
Candoitnow001 2022-08-01 21:12:47
Not yet
Candoitnow001 2022-08-01 21:12:58
I’m trying still not yet
Candoitnow001 2022-08-01 21:13:05
Ur full name
Candoitnow001 2022-08-01 21:13:11
V for?
Vchoudhary12 2022-08-01 21:13:26
Send your full query here
Candoitnow001 2022-08-01 21:13:28
This side Ajay
Vchoudhary12 2022-08-01 21:13:30
I’ll edit and send you
Candoitnow001 2022-08-01 21:13:40
Ok ill share it
Candoitnow001 2022-08-01 21:14:24
*Write a sql query for one primary key with multiple foreign keys*

Example :
table name( Booking)

Create table Booking
(
booking_id int(10) NOT NULL,
Hotel_no Varchar(10) not null,
Guest_no varchar (10) not null,
Date_from Date not null,
Date_to Date not null,
Room_no Date not null,
Booking_id int(10) primary key references booking(booking_id) ,

Hotel_no varchar(10) foreign key references hotel(hotel_no) ,

Guest_no varchar(10) foreign key
References Guest (guest_no) ,

room_id int(10) foreign key references room(room_no)
) ;

Candoitnow001 2022-08-01 21:15:25
Hotel_no ,
guest_no,
Room_no
Those are Foreign key
Candoitnow001 2022-08-01 21:15:42
Primary key Booking_id
Candoitnow001 2022-08-01 21:15:55
Tq
Candoitnow001 2022-08-01 21:16:04
Name?
Candoitnow001 2022-08-01 21:18:13
Hello V
Where r from ?
Candoitnow001 2022-08-01 21:18:23
I’m from India
Vchoudhary12 2022-08-01 21:18:28
You need output right ?
Candoitnow001 2022-08-01 21:18:36
Yeah
Candoitnow001 2022-08-01 21:18:38
Sorry
Vchoudhary12 2022-08-01 21:18:43
Sending in 2mins
Candoitnow001 2022-08-01 21:18:49
I dnt need all those
Candoitnow001 2022-08-01 21:18:54
I need output
Candoitnow001 2022-08-01 21:19:11
I’ll wait
Vchoudhary12 2022-08-01 21:20:40
Create table Booking
(
Booking_id int(10) not null,
Hotel_no varchar(10) not null,
Guest_no varchar (10) not null,
Date_from Date not null,
Date_to Date not null,
Room_no Date not null,
Primary key (Booking_id),
Foreign key (Hotel_no) references hotel(hotel_no) ,
Foreign key (Guest_no) references guest(guest_no) ,
Foreign key (Room_no) references room(room_no)
) ;
Candoitnow001 2022-08-01 21:21:08
I’ll try this
|