It's UWAweek 47

help1402

This forum is provided to promote discussion amongst students enrolled in CITS1402 Relational Database Management Systems.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 684 articles.
Currently 133 other people reading this forum.


 UWA week 31 (2nd semester, week 2) ↓
SVG not supported

Login to reply

👍?
helpful
11:32am Fri 2nd Aug, Tuan H.

Hi all, I have a question related to data type when defining a new table. When I define my table, I realise that we define the attribute "DOB" as DATE, but when I want to enter data into my table, as follows: e.g. INSERT INTO Branch(DOB) VALUES ('1995-10-31') The value I inserted into the table is a string, so when I did additional test to see whether this data is automatically transformed to DATE data type, I encountered an unexpected result. There are some solutions I came up with after research: 1. Use DATE() --> INSERT INTO Branch(DOB) VALUES (DATE '1995-10-31'): the expected result is not 1995-10-31 2. According to the textbook, numeric data should be in a quotation mark --> INSERT INTO Branch(DOB) VALUES (1995-10-31): SQL does the subtraction. Can anyone help me on this problem? Thank you so much.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy