Posts

Showing posts with the label MS SQL Server

Microsoft SQL Server In A Glance

SQL Server In a glance Data manipulation Language (DML) – Insert/Update/Delete/Select Data Dynamic Language (DDL) – Create/Alter/Drop/Truncate Data Control Language (DCL) – Grant/Revoke Dynamic Management View (DMV) – Server State/Monitor health of system Transactional Control Language (TCL) – Commit/Rollback ACID Properties A – Atomicity – All or no transaction C – Consistency – Move a transaction from one state to another I - Isolation – Keep transaction separate D – Durability – Make sure no data lost Keys Primary Key – Uniquely identifying each row in a table Foreign Key – It is used to generate the relationship between the tables. Composite/Compound Key –key that consist of two or more columns that uniquely identify rows in a table. Unique Key - Uniquely identifying a row in a table. It can also store Null values Candidate Key – key that consist of two or more columns that uniquely identify rows in a table and one key chosen as primary key....

Randomly Select Data Rows From Sql Database

If your requirement is to select random records from SQL database, you can do with the help of below sql statement select top 1 * from tableName order by NEWID ()