grace christopher

Greenhorn
+ Follow
since Oct 02, 2016
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by grace christopher

You can use PRIMARY KEY or UNIQUE Constraint to appropriate fields for preventing duplicates when table being created.
example
Create Table with PRIMARY KEY

CREATE TABLE user_info
(
    username CHAR(50)  NOT NULL,
    email CHAR(100)  NOT NULL,
    PRIMARY KEY (username, email)
);
You can use PRIMARY KEY or UNIQUE Constraint to appropriate fields for preventing duplicates when table being created.
example
Create Table with PRIMARY KEY

CREATE TABLE user_info
(
    username CHAR(50)  NOT NULL,
    email CHAR(100)  NOT NULL,
    PRIMARY KEY (username, email)
);
You can use PRIMARY KEY or UNIQUE Constraint to appropriate fields for preventing duplicates when table being created.
example
Create Table with PRIMARY KEY

CREATE TABLE user_info
(
   username CHAR(50)  NOT NULL,
   email CHAR(100)  NOT NULL,
   PRIMARY KEY (username, email)
);

tushar attar wrote:Hi
I want to fetch data from my sql database. Knowing that sql store date in yyyy-mm-dd format, I want to fetch this date in form of day, month and year separately in java (may be in form of string, three different variables).

How can I do that? Please tell

Thanks





In particular, it means you don't need to worry about the time zone of the Calendar vs the time zone of a SimpleDateFormat - you can just parse to a LocalDate, which is what the data really shows you. It also means you don't need to worry about months being 0-based




3 years ago

Maneesh Godbole wrote:Welcome to the Ranch

For file i/o refer to http://docs.oracle.com/javase/tutorial/essential/io/file.html
What is table? DB? UI? anything else. Please TellTheDetails



It consists of columns, and rows. In relational databases and flat file databases, a table is a set of data elements (values) using a model of vertical columns (identifiable by name) and horizontal rows, the cell being the unit where a row and column intersect.

DB is a database file format for Windows. DB files store data information, usually stored in a series of tables, table fields, and field data values.
UI?
In information technology, the user interface (UI) is everything designed into an information device with which a human being may interact -- including display screen, keyboard, mouse, light pen, the appearance of a desktop, illuminated characters, help messages, and how an application program
3 years ago
Because it doesn't make sense to execute/retrieve something outside of a method/block/assignment. What do you expect the stray b.behavior() and b1.instanceVariable to do?
3 years ago