Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

SQL Min ( ) Function

This function is used to get the minimum value from the selected field . Syntax : select min ( column_name ) from table_name ; Example : Table name : Employee_Info Id Employee_name Employee_Age Employee _Salary 1

SQL SELECT COUNT

To return the number of rows in a query,we use COUNT. It counts the numbers of records. the syntax of SQL COUNT statement. SELECT COUNT (expression) FROM tables WHERE conditions; SQL SELECT COUNT(column_name) SELECT COUNT(name) FROM empl

ALTERNATE KEY IN SQL

Keys are used to uniquely identify records in a table. it is used to establish relation within a table. Primary keys,Foreign keys, candidate keys and alternate keys are used in tables which identify rows. All keys other than primary key are Alterna

SQL CHECK Constraint

It limits the value range which is mentioned in column. Example of check constraint CREATE TABLE Persons ( PId int NOT NULL, LastName varchar(255) NOT NULL, FirstName varchar(255), Address varchar(255), City varchar(255), CONSTRAINT chkPerson CHECK

Get the List of all tables using foreign key

Hello All, Many time, We want to know that, What are all the tables who have referenced a column as a "foreign key" which is a "Primary Key" of other table. Example:-- In a database I have one Company table which stores company information with Co

SQl:Create,Drop and Select Database Commands

1. CREATE DATABASE Create database is a type of command used to create new SQL database. Here is the syntax of CREATE DATABASE statement:- CREATE DATABASE DatabaseName; 2.DROP DATABASE Drop database is a type of command used to drop any exist

How to use INSERT INTO SELECT in SQL

By using INSERT INTO SELECT Statement one can copy data from one table to other existing table. Syntax: To copy all the columns from one table to another table: INSERT INTO table_name1 (SELECT * from table_name); To copy only the selected columns

Schemas in SQL

Schema or Structure can be defined in SQL A schema is a collection of logical structures of data objects. A schema is associated with a database user and has the same name as that user. Each user have a single schema. Schema is mainly collection of

SQL Server : How to shrink or clear the transaction log file ?

Many times the large size of transaction log file (.ldf) in Microsoft SQL is too big which leads to performance issues and loss of valuable disk space.Therefore it's imperative to periodically do database maintenance. In order to clear or shrink

SQL Server : How to truncate a table being referenced by a FOREIGN KEY constraint ?

Many times we need to truncate a table which has an FK constraint on it. Typically we get the following error: Cannot truncate table 'TableName' because it is being referenced by a FOREIGN KEY constraint. The solution to the above problem is to fol

1 5 54
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: