wahts is mean by primary key and unique key?
Answers were Sorted based on User's Feedback
Answer / swapna
Primery Key:- A column or set of columns that uniquely
identify all the rows in a table. Primary keys do not allow
null values. No two rows can have the same primary key
value; therefore, a primary key value always uniquely
identifies a single row.
Unique Key:- Unique Keys are used to uniquely identify each
row in an Oracle table. There can be one and only one row
for each unique key value. no value repeate in the other
rows of the same table.
Is This Answer Correct ? | 21 Yes | 7 No |
Answer / seshu
HI ALL
PRIMARY KEY :- UNIQUE+NOT NULL
UNIQUE kEY :- UNIQUE +NULL
Is This Answer Correct ? | 13 Yes | 0 No |
Answer / m.karthikeyan
hi dear friends....
unique key is also act as a primary key but it accept the
null values that is the difference b/w them...
Is This Answer Correct ? | 14 Yes | 3 No |
Answer / anjani kumar jha
always remember
in 1 table there must be only on primary key,but may have
more than on unique key
Is This Answer Correct ? | 12 Yes | 4 No |
Answer / bhausaheb.chate
Primary Key:- Primary Key is an attribute or a set of
attributes in a table which uniquely identifies a record
(row) in a table and no two records (rows) in the table can
have the same values for all the columns comprising the
primary key.
Unique Key:- A unique key is a key which stores unique
values (no duplicates) for that particular column.
Difference between Primary Key & Unique Key:-
1. A Unique key can store a null value and primary key
cannot store any null value.
2. A primary key can be references to another table as a
Foreign Key.
Is This Answer Correct ? | 7 Yes | 2 No |
Answer / murugan
A Column or set of Columns that uniquely identify all the
rows in a table......
Is This Answer Correct ? | 4 Yes | 6 No |
Answer / bhausaheb.chate
A Column or set of Columns that uniquely identify all the
rows in a table .......
Is This Answer Correct ? | 3 Yes | 6 No |
Why “no suitable driver” error occurs?
Explain the necessary steps to connect to the database in java?
Explain the two tier and three tier architecture of jdbc.
What are the different types of lockings in jdbc?
Difference between Generic Servlet and HTTP Servlet?
Explain the various types of locking system in jdbc?
dear friends I have made connection with SQLSERVER where the following code is compiling properly but giving error at the runtime . I think error in this line where i am sending the value through string Connection connection = DriverManager.getConnection ( "jdbc:microsoft:sqlserver://localhost:1433","sa",""); import java.sql.*; //import mssqlserver.*; public class TestSQLCON { public TestSQLCON() throws Exception { // Get connection DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver()); System.out.println(); System.out.println("Successfully connected one"); System.out.println(); Connection connection = DriverManager.getConnection ( "jdbc:microsoft:sqlserver://localhost:1433","sa",""); if (connection != null) { System.out.println(); System.out.println("Successfully connected"); System.out.println(); // Meta data DatabaseMetaData meta = connection.getMetaData(); System.out.println("\nDriver Information"); System.out.println("Driver Name: " + meta.getDriverName()); System.out.println("Driver Version: " + meta.getDriverVersion()); System.out.println("\nDatabase Information "); System.out.println("Database Name: " + meta.getDatabaseProductName()); System.out.println("Database Version: "+ meta.getDatabaseProductVersion()); } } public static void main (String args[]) throws Exception { TestSQLCON test = new TestSQLCON(); } } so please help me
What are the common tasks of JDBC?
What is JDBC Savepoint? How to use it?
What is JDBC RowSet? What are different types of RowSet?
What does the jdbc databasemetadata interface?
Explain about column name and getter method?