CREATE TABLE Employees
(
Id int,
Name varchar(50) not null,
Photo varbinary(max) not null
)
INSERT INTO Employees (Id, Name, Photo)
SELECT 10, 'John', BulkColumn
FROM Openrowset( Bulk 'C:\photo.bmp', Single_Blob) as EmployeePicture
More Related Contents:
- Insert results of a stored procedure into a temporary table
- Select top 10 records for each category
- How important is the order of columns in indexes?
- Using the result of an expression (e.g. Function call) in a stored procedure parameter list?
- sql query to return differences between two tables
- SQL Server – transactions roll back on error?
- Difference between a User and a Login in SQL Server
- Drop all the tables, stored procedures, triggers, constraints and all the dependencies in one sql statement
- For Nvarchar(Max) I am only getting 4000 characters in TSQL?
- How to insert multiple records and get the identity value?
- How do I group on continuous ranges
- How can a LEFT OUTER JOIN return more records than exist in the left table?
- “select * from table” vs “select colA, colB, etc. from table” interesting behaviour in SQL Server 2005
- Dynamic SQL to generate column names?
- Is it possible to perform multiple updates with a single UPDATE SQL statement?
- SQL comma-separated row with Group By clause
- Column name or number of supplied values does not match table definition
- Incorrect syntax near the keyword ‘with’…previous statement must be terminated with a semicolon
- SQL Server PIVOT perhaps?
- How to find consecutive rows based on the value of a column?
- How to escape square brackets inside square brackets for field name
- How do you copy a record in a SQL table but swap out the unique id of the new row?
- Use variable with TOP in select statement in SQL Server without making it dynamic [duplicate]
- How do I find the data directory for a SQL Server instance?
- Add a row number to result set of a SQL query
- Compare dates in T-SQL, ignoring the time part
- How can I find Unicode/non-ASCII characters in an NTEXT field in a SQL Server 2005 table?
- Sql Server : How to use an aggregate function like MAX in a WHERE clause
- Backup SQL Schema Only?
- Hierarchical Queries in SQL Server 2005