what is Constraint? How many types of constraints in SQL ?
Answer Posted / pramod tiwari,mba-it,lpu
SQL Constraints-
Constraints are used to limit the type of data that can go
into a table.
Constraints can be specified when a table is created (with
the CREATE TABLE statement) or after the table is created
(with the ALTER TABLE statement).
We will focus on the following constraints:
•NOT NULL
•UNIQUE
•PRIMARY KEY
•FOREIGN KEY
•CHECK
•DEFAULT
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
What are the types of database schema? : sql server analysis services, ssas
How to drop an existing table with "drop table" statements in ms sql server?
What is snapshot report?
As per your opinion what are the five top responsibilities of a dba? : sql server database administration
What is data file in computer?
what is bit datatype and what's the information that can be stored inside a bit column? : Sql server database administration
This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?
What does the update command do?
Difference between uniqe index and uniqe constraint?
How to include text values in sql statements?
What is a sql join?
List the different index configurations possible for a table?
What is resource db in sql server?
What is database white box testing?
How many types of attribute relationships are there? : sql server analysis services, ssas