On Saturday 15 March 2003 04:08, vishnu mahendra wrote: > create table stud(rno integer not null, > name char(10), > primary key(rno)); > > create table mark(rno integer not null references > stud, > mark integer);
[skip] > how is it possible. > there is no rollno 3 in the stud table, > then how does it accept the rollno 3 in the mark > table. > does foreign key really working, > or i am doing something wrong. REFERENCES do nothing in MySQL for all table types except InnoDB tables. How to use FOREIGN KEY CONSTRAINTS on InnoDB table look at: http://www.mysql.com/doc/en/SEC457.html > how can i convert the default date format to the > format > 'dd-mm-yyyy'. Use DATE_FORMAT() function: http://www.mysql.com/doc/en/Date_and_time_functions.html > or how can i insert the date in the format > 'dd-mm-yyyy'. You can't if you want to store as DATE/DATETIME column type. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php